note 36348 deleted from function.opendir by sniper
| From: | sniper@php.net | Date: | Sun, 12 Oct 2003 04:23:31 +0000 |
| Subject: | note 36348 deleted from function.opendir by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58320@lists.php.net to get a copy of this message | ||
Note Submitter: zmatic@hawaii.rr.com
----
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.