|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-08-11 07:34 UTC] sebastian@php.net
<?php $dh = opendir('g:/'); ?>
gives me
Warning: OpenDir: Invalid argument (errno 22)
where g:/ is my CD Rom drive.
<?php $dh = opendir('c:/'); ?>
works fine, c:/ beeing my harddrive.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 20:00:02 2025 UTC |
Sorry Phil, I didn't read the If you send me your php.exe and php4ts.dll buit from CVS I'll test that here if it helps. part of your message the first time. I'm, really sorry! php.exe/php4ts.dll are on their way.Just updating with a couple of comments that were emailed rather than going via the bug tracking system: Sebastian replied to the last bug posting: This is odd. The same binaries still give me with my CD and DVD drives ? Warning: OpenDir: Invalid argument (errno 22) for ? <?php echo $dh = opendir('g:/'); ?> To which Michael Loftis replied: g:\ is the windows way.... ?That could be whats fudging it. Justa ?wild guess. And to which I now reply: On NT and W2K G:/ is perfectly allright. Sebastian, what platform are you on (is it different from my NT4/IIS setup which seems to work ok?)I changed the permissions in my inetpub directory to full access for the IUSR account (which I assume IIS uses for php to do file operations). Ofcourse full access is a bit much but, it works ;) I'm not sure if this is the place for codes but figured I'd post my recursive files/directory reader function I wrote based on tons of "whatever is this supposed to work?" codes on the php.net pages. Tried to add a comment there but all I got was a "phpschool.com" page not found error... so, if it's any useful, here it goes.. it's very basic and just gives a nice output of my full inetpub dir. <?php rec_readdir("e:\inetpub\wwwroot"); function rec_readdir($dirname) { if ($dir = opendir($dirname)) { while (false !== ($file = readdir($dir))) { if (($file !=='.') && ($file!=='..') && ($file !== $dirname)) { $checkdirname = $dirname."\\".$file; if(is_dir($checkdirname)) { echo "<BLOCKQUOTE>\n"; echo "<B>recdir: $checkdirname</B><BR>\n"; rec_readdir($checkdirname); echo "</BLOCKQUOTE>\n"; } else { echo "$dirname\<I>$file</I><BR>\n"; } } } closedir($dir); } } ?>