note 38917 added to function.is-dir
| From: | xlabATadaptiveNOSPAMartsDOTnet at rn2 dot php dot net | Date: | Mon, 12 Jan 2004 06:23:42 +0000 |
| Subject: | note 38917 added to function.is-dir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63337@lists.php.net to get a copy of this message | ||
I noticed issues when using this function on IIS 5 /PHP 4.3.0. Everything worked fine until I
renamed a directory in Explorer, after which, I started getting errors stating that the directory
didn't exist. Did everything short of remaking the webserver, to no avail. So my workaround
was:
<?
function listDirs($dir){
$files=scanDir($dir); // user-defined function, not PHP 5 function
for($i=0;$i<count($files);$i++){
if($files[$i]=="."||$files[$i]=="..")continue;
// I'll just have to refrain from using periods in directory names
if(!preg_match("/\./",$files[$i]))$dirs[]=$files[$i];
}
return $dirs;
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.is-dir.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38917
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38917&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38917&report=yes
Search -- http://master.php.net/manage/user-notes.php