PashaM
Apr 23rd 2007, 1:00 am
I am using a File Hosing script on my site. (called "FreeFileHosing")
I got this error out of the blue, i didnt change anything, it just happened:
"Fatal error: Call to undefined function: total_size() in /var/www/html/ffh/index.php on line 38"
What could be the problem?
this is the relavent code in index.php:
$fileshosted=sizeof(file("./files.txt")); //get the # of files hosted
$sizehosted = 0; //get the storage size hosted
$handle = opendir("./storage/");
while($file = readdir($handle)) {
$sizehosted = $sizehosted + filesize ("./storage/".$file);
if((is_dir("./storage/".$file.'/')) && ($file != '..')&&($file != '.'))
{
$sizehosted = $sizehosted + total_size("./storage/".$file.'/');
}
}
$sizehosted = round($sizehosted/1024/1024,2);
I got this error out of the blue, i didnt change anything, it just happened:
"Fatal error: Call to undefined function: total_size() in /var/www/html/ffh/index.php on line 38"
What could be the problem?
this is the relavent code in index.php:
$fileshosted=sizeof(file("./files.txt")); //get the # of files hosted
$sizehosted = 0; //get the storage size hosted
$handle = opendir("./storage/");
while($file = readdir($handle)) {
$sizehosted = $sizehosted + filesize ("./storage/".$file);
if((is_dir("./storage/".$file.'/')) && ($file != '..')&&($file != '.'))
{
$sizehosted = $sizehosted + total_size("./storage/".$file.'/');
}
}
$sizehosted = round($sizehosted/1024/1024,2);