Clinger Posted February 16, 2007 Share Posted February 16, 2007 I've never seen this until just recently. When I read a directory using readdir, in addition to the usual ".." and ".", it is now returning a string that says "No Files Currently". 2 Questions. 1.) Why the **** would PHP return a string like that? If the directory is empty, it shouldn't return anything. 2.) How do I disable that? Example: <?php $handle=opendir("blah/"); while (false !== ($file=readdir($handle)) { if (($file != "..")&&($file != ".")) { echo "blah"; } } ?> Link to comment https://forums.phpfreaks.com/topic/38808-readdir-nuisance/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.