note 20940 deleted from function.is-dir by sander

From: Date: Fri, 24 May 2002 17:34:42 +0000
Subject: note 20940 deleted from function.is-dir by sander
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-31003@lists.php.net to get a copy of this message
is_dir() function don't work in win32. This metod work: function get_dirs($dir) { $handle=opendir($dir); while ($file = readdir($handle)) { if ($file != "." && $file != "..") if ($aux=@opendir($dir."/".$file)) { closedir($aux); $buffer[]=$file; }; }; closedir($handle); return $buffer; } This return a array with all directories in $dir. Here a function that work: function is_direx($dir) { if ($aux=@opendir($dir."/".$file)) { closedir($aux); return 1; }; return 0; };

« previous php.notes (#31003) next »