<?php
$directory = "/home/test/www/wml/midi";
if ($handle = opendir($directory)) {
echo "Directory: $directory<br>Files:<br>";
/* This is the correct way to loop over the directory. */
while (false !== ($file = readdir($handle))) {
echo "$file<br>";
}
closedir($handle);
}
?>
I found this little script that will list the contents in the directory. Now I have them posting and when I veiw the data it works fine only that its showing the
. and .. directorys. though how would I strip those out without stripping out the . in the extention of the file name like test.midi
Couldnt I just put in a insert statement in this script in here
while (false !== ($file = readdir($handle))) {
echo "$file<br>";
}