Hello all,
I found a very helpful script to calculate folder sizing in php. It is as follows:
<?php
$path = "gal";
echo "Folder $path = ".filesize_r($path)." bytes";
function filesize_r($path){
if(!file_exists($path)) return 0;
if(is_file($path)) return filesize($path);
$ret = 0;
foreach(glob($path."/*") as $fn)
$ret += filesize_r($fn);
return $ret;
}
?>
This works great when I set my path to either of the two drives located in my webserver. But when I tried a network path (either as //IP/share/folder, or Mapped Drive:/folder) I get a 0 back.
Is there some way that I should be setting permissions to access that share by PHP? I have the drive mapped on the webserver, and the user/password of the share is identicle to that of the webserver's signon. Thanks!