For the past 6 months I have used this script to call up certain files based upon the date:
[code]<?php
$today = date(“z”);
$handle=opendir(’/home/springfi/public_html/happenings/’);
while (($file = readdir($handle))!==false) {
if ($file == $today + '.php') {
include("happenings/$file");
}
}
closedir($handle);
?>
</p>
<p>
<?php
$tomorrow = date("z")+1;
$handle=opendir('/home/springfi/public_html/happenings/');
while (($file = readdir($handle))!==false) {
if ($file == $tomorrow + '.php') {
include("happenings/$file");
}
}
closedir($handle);
?>
[/code]
And the script continues to cover two weeks. The files being called up are named 0.php through 365.php
Today I start getting errors:
Warning: include(happenings/.) [function.include]: failed to open stream: No such file or directory in /home/springfi/public_html/oldhappenings.php on line 9
Warning: include() [function.include]: Failed opening ‘happenings/.’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/springfi/public_html/oldhappenings.php on line 9
It appears to be attempting to display an error message for each file and folder in the /happenings/ directory - over 100 error messages before I stop the browser.
I’m at a loss.