I'm running a Windows VM setup with IIS and PHP 5.3.28.
Basically I am scanning a directory:
$dir = 'C:\Users';
$files = scandir($dir);
print_r($files);
Which outputs:
Array
(
[0] => .
[1] => ..
[2] => .NET v4.5
[3] => .NET v4.5 Classic
[4] => All Users
[5] => Default
[6] => Default User
[7] => New folder
[8] => Public
[9] => desktop.ini
[10] => my-folder
)
Now if I try and go further:
$dir = 'C:\Users\my-folder';
$files = scandir($dir);
I get nothing... I checked the permissions of 'my-folder' and they are 777. Am I missing something?
Are the folder permissions on C:\\Users\\ recursive? Does PHP have access to the folder? I believe you may have missed a permission to tweak or two, this is common in Windows.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.