public static function write_file($file, $content, $mode='w'){ //写入文件
global $c;
file::mk_dir(dirname($file));
$fp=@fopen($c['root_path'].$file, $mode);
if($fp){
flock($fp, LOCK_EX);
fwrite($fp, $content);
flock($fp, LOCK_UN);
fclose($fp);
return true;
}else{
return false;
}
}
Fatal error: Uncaught Error: Call to undefined method file::write_file() in /www/wwwroot/fortunepacific.net/static/themes/t197/inc/header.php:122
Stack trace:
#0 /www/wwwroot/fortunepacific.net/static/themes/t197/products.php(15): include()
#1 /www/wwwroot/fortunepacific.net/static/static/inc/init.php(171): include('/www/wwwroot/fo...')
#2 /www/wwwroot/fortunepacific.net/index.php(7): include('/www/wwwroot/fo...')
#3 {main}
thrown in /www/wwwroot/fortunepacific.net/static/themes/t197/inc/header.php on line 122