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