note 15766 added to function.is-dir

From: Date: Tue, 02 Oct 2001 07:57:42 +0000
Subject: note 15766 added to function.is-dir
Groups: php.notes 
Request: Send a blank email to php-notes+get-18462@lists.php.net to get a copy of this message
Well, this function does not work within folder structures but only in the current folder set with 'chdir($folder)'. having this problem i wrote a little function like this: function is_directory($path, $folder, $to_root) { @chdir($path); $return_str = @is_dir($folder); for($i=0; $i<$to_root; $i++) { $to_root_str .= "../"; } @chdir($to_root_str); return $return_str; } hope this helps... bye stefan -- http://www.php.net/manual/en/function.is-dir.php http://master.php.net/manage/user-notes.php?action=edit+15766 http://master.php.net/manage/user-notes.php?action=delete+15766 http://master.php.net/manage/user-notes.php?action=reject+15766

« previous php.notes (#18462) next »