|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-02-10 15:50 UTC] cstreeter at andesagroup dot com
This code:
if ($dir = opendir( $dirPath ) ) {
while ( ( $file = readdir( $dir ) ) !== false) {
echo "$file\n";
}
closedir( $dir );
}
Give me this error:
Warning: opendir(i:\templates) [function.opendir]: failed to open dir: Invalid argument in C:\www\AndesaNet\function_library.php on line 298
I: is a UNC mapped drive and i:\templates is a network folder that I have full access to. I can read, write, change and delete files here both from a DOS prompt and from Windows Explorer.
I am running PHP as a module on Apache2 (win bianaries)
Is this a known bug?
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 14:00:01 2025 UTC |
I've ran a few tests on Windows XP using the latest PHP. First of all PHP can open networked drives, however it can do so when you specify the network share speficially, for example: opendir("\\\\my.ip\\my_dir"); Also, the access to the drive needs to be previously authenticated, so the auth process need not be done by PHP, which cannot do it. Meaning that in my tests it only worked if I opened the network drive manually first using explorer and supplied to proper credentials (login & password), which the system then used automatically for all future connections.