Reply to Very Simple Problem in include

Your name:

Reply:


Posted by one man army on 12/20/05 09:04

Hi All-
(complete beginner in PHP, using example code written by Rasmus from
Cool Toys blog)

I have copied a script into a working directory (unix), it includes
another script (verbatum from Rasmus).
Q. Why is the included script called xxx.phps instead of xxx.php?

In the original, Rasmus placed his included script in the PHP lib
directory. I placed it in my working directory instead, changing the
include path.
The included script IS FOUND. But when the included script is called
in, the first line is a call to apc_fetch(), and PHP complains 'Call to
undefined function apc_fetch()'. Something is obviously broken.

I don't know enough basics to spot the construct error. Anyone?

==
included file - unchanged, but a local copy in my working dir
== http://lerdorf.com/php/simple_rss.phps

==
script under construction
== mapTest.php

<html><head>
<script type="text/javascript" src="http://api.maps.yahoo.com/v2.0/fl/javascript/apiloader.js"></script>
<style type="text/css">
#mapContainer {
height: 600px;
width: 800px;
}
</style>
<?php
include './simple_rss.phps';

$url = 'http://aSite.com/map_testQ/myTest.xml';
$feed = rss_request($url, $timeout=3600);

echo <<<EOB
<title>FAKE</title>
</head><body>
<h1>header</h1>
<p><font size="+2">Name<br />
subject</font></p>
EOB;

echo 'feed=';
echo $feed;
?>

<div id="mapContainer"></div>


</body></html>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация