yubin
03-11-2004, 09:20 AM
ok, I have a PHP page that reads a Directory and automatically hyperlinks the files. I want to pass this info onto a flash slideshow so that the pictures are loaded dynamically from the directory. This way as the pictures need updating all I have to do is insert the new ones and delete the old ones. I assume that the PHP should send the info to a txt file, but I'm a newbie when it comes to this. Any ideas?
Here's my PHP code.
<?
$maindir = "." ;
$mydir = opendir($maindir) ;
$exclude = array( "myPics.php") ;
while($fn = readdir($mydir))
{
if ($fn == $exclude[0] || $fn == $exclude[1]) continue;
echo "<br><a href='$fn'>$fn</a>";
}
closedir($mydir);
?>
Thanks,
Yubin
Here's my PHP code.
<?
$maindir = "." ;
$mydir = opendir($maindir) ;
$exclude = array( "myPics.php") ;
while($fn = readdir($mydir))
{
if ($fn == $exclude[0] || $fn == $exclude[1]) continue;
echo "<br><a href='$fn'>$fn</a>";
}
closedir($mydir);
?>
Thanks,
Yubin