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);
Hello friends, Could anyone suggest me code for string validation, for example, if anyone enters numbers in string then an error message should be displayed. Thanks.
What exactly means "unavailable" ? How do i make it abailable? this is the link to this error: http://www.maloestado.com/ffh/
total_size() isn't a native PHP function. The file in your script where it is declared probably isn't included or something.
this is the line 38 of that file that gives error: $sizehosted = $sizehosted + total_size("./storage/".$file.'/'); so you'r saying that this total_size variable should be defined somewhere else? and isn't there supposed to be a $ in front of total_size in that line?