Re: Unix problem

From: Date: Sat, 19 May 2001 16:16:46 +0000
Subject: Re: Unix problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-53534@lists.php.net to get a copy of this message
while ($Directory=readdir($DirHandle)) { $IsFile = is_file($Directory); $IsDir = is_dir($Directory); echo " is file=$IsFile - is dir=$IsDir\n";
        Works fine on Windows box, on a Unix box (RedHat) both
is_file() and is_dir() return null no matter what the contents of $Directory is.
This is a wild guess.. UPPER and lowercase used instead of only upper of only lowercase.. Spaces in file or directory names..
        Thanks for the suggestion but if I have:
while ($Directory=readdir($DirHandle)) { $IsFile = is_file($Directory); $IsDir = is_dir($Directory); echo " is file=$IsFile - is dir=$IsDir\n"; echo "name=$Directory\n"; It displays the name of the file or directory correctly. Urb
Bye, B. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#53534) next »