note 37361 added to function.file-exists
| From: | e dot entropy at juno dot com | Date: | Wed, 12 Nov 2003 03:42:47 +0000 |
| Subject: | note 37361 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60276@lists.php.net to get a copy of this message | ||
For those of you who didn't have the time to write your own <b>news marquee</b>,
and that have a php-driven site...
Check this out:
<marquee bgColor="#000000" width="120" direction="up">
<font color="#FFFFFF">
<?php
$i = 0;
$folder = "news";
$ext = "inc";
while (file_exists("./$folder/$i.$ext")) {
echo ("<BR>");
include ("./folder/$i.$ext");
echo ("<BR><HR>");
$i++;
}
?>
</font>
</marquee>
// you can change the $folder to anything you want, along with the inclusion extension ($ext).
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37361
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37361&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37361&report=yes
Search -- http://master.php.net/manage/user-notes.php