note 33013 added to function.is-dir

From: Date: Fri, 13 Jun 2003 19:04:38 +0000
Subject: note 33013 added to function.is-dir
Groups: php.notes 
Request: Send a blank email to php-notes+get-50301@lists.php.net to get a copy of this message
The PHP function is_dir returns true on files that have no extension. The filetype function will tell you correctly what the file is: if (is_dir($realpath($ThisFile))) { if (filetype(realpath($ThisFile)) == "dir") { // Stuff here } } ---- Manual Page -- http://www.php.net/manual/en/function.is-dir.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33013 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33013&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33013&report=yes

« previous php.notes (#50301) next »