note 20254 added to function.is-dir
| From: | ze_ped at hotmail dot com | Date: | Wed, 27 Mar 2002 18:42:41 +0000 |
| Subject: | note 20254 added to function.is-dir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28290@lists.php.net to get a copy of this message | ||
A way safer method of verifying if a file is a dir than the one described above (I just don' t
like that rmdir()... besides it didn' t work with me).
function is_directory($filepath) {
// $filepath must be the entire system path to the file
if (!@opendir($filepath)) return FALSE;
else {
return TRUE;
closedir($filepath);
}
};
--
http://www.php.net/manual/en/function.is-dir.php
http://master.php.net/manage/user-notes.php?action=edit+20254
http://master.php.net/manage/user-notes.php?action=delete+20254
http://master.php.net/manage/user-notes.php?action=reject+20254