note 36348 added to function.opendir

From: Date: Mon, 06 Oct 2003 20:59:50 +0000
Subject: note 36348 added to function.opendir
Groups: php.notes 
Request: Send a blank email to php-notes+get-57910@lists.php.net to get a copy of this message
Try not to use is_dir and opendir when accessing network root directories. I made the mistake for basing my network directory browse procedure on the opendir sample code. $dir = '\\\\servername\\sharename' $dir2 = '\\\\servername\\sharename\\subdir' is_dir($dir) returned false so my procedure was broken. is_dir($dir2) returned true -- so my procedure only worked when accessing subdirectories. I removed the is_dir check on my network browsing procedure and now it runs without any problem. ---- Manual Page -- http://www.php.net/manual/en/function.opendir.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36348 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36348&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36348&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#57910) next »