opendir cannot read network drives
Posted: Thu Oct 26, 2006 10:55 am
currently using this function (which works perfectly) for listing files in a folder
now on my machine i have access to a shared drive named on mine
whenever i tell PHP to read it it wont, why is this? i cant even read the base of Z but when i change to C it works fine which leads me to think PHP wont allow it or its a windows thing and i need to change a setting
Anyone any ideas?
Code: Select all
function readDirectory ($dirPath) {
if ($handle = opendir($dirPath)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
if (!isset($i)) {
$i = 1;
}
$array[$i] = $file;
$i++;
}
}
closedir($handle);
}
return $array;
}Code: Select all
c on 'andys (Your-j9bfddr9va)'
// labelled as Z:Anyone any ideas?