note 37319 added to function.is-dir
| From: | Rama at paris-bd dot org | Date: | Mon, 10 Nov 2003 16:36:02 +0000 |
| Subject: | note 37319 added to function.is-dir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60211@lists.php.net to get a copy of this message | ||
This function implements is_dir in any directory :
function is_directory($file) {
$real_path=realpath($file);
$initial_path=getcwd();
$goto_path=dirname($file);
chdir($goto_path);
if(is_dir(basename($file))==TRUE){
$isdir=1;
}
else{
$isdir=0;
}
chdir($initial_path);
return $isdir;
}
----
Manual Page -- http://www.php.net/manual/en/function.is-dir.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37319
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37319&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37319&report=yes
Search -- http://master.php.net/manage/user-notes.php