I'm trying to get this script to show me the contents of a directory on my remote server. The script is running without errors, and is pointing at the right directory.
There are no filenames of the files in the directory echoing to the browser. The space beetween the horizontal rules is just blank.
Any ideas why this may be happening?
Settings in php.ini perhaps?
<?php
$current_dir='/home/robhayes/public_html/uploads/';
$dir=opendir($current_dir);
echo "Upload directory is $current_dir <br>";
echo 'Directory Listing:<br><hr><br>';
while($file=readdir($dir));
{
echo "$file <br>";
}
echo'<hr><br>';
closedir($dir);
?>
There are no filenames of the files in the directory echoing to the browser. The space beetween the horizontal rules is just blank.
Any ideas why this may be happening?
Settings in php.ini perhaps?
<?php
$current_dir='/home/robhayes/public_html/uploads/';
$dir=opendir($current_dir);
echo "Upload directory is $current_dir <br>";
echo 'Directory Listing:<br><hr><br>';
while($file=readdir($dir));
{
echo "$file <br>";
}
echo'<hr><br>';
closedir($dir);
?>