note 37319 deleted from function.is-dir by tomsommer
| From: | tomsommer@php.net | Date: | Sat, 07 Aug 2004 04:22:10 +0000 |
| Subject: | note 37319 deleted from function.is-dir by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-74130@lists.php.net to get a copy of this message | ||
Note Submitter: Rama@paris-bd.org
----
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;
}