I've got a problem,.
I have this script, it list .txt files in a folder and print it:
Code: Select all
if ($handle = opendir("."))
{
while (false !== ($file = readdir($handle)))
{
if (substr($file,-4)==".txt") echo "$file<br>";
}
closedir($handle);
}