老大: 这个站域名:www.shengmeilian.cc 提示一些警告 估计在某个地方关闭(Warning: file_put_contents(/var/www/clients/client379/web455/web//temp/static_caches/shop_config.php) [function.file-put-contents]: failed to open stream: No such file or directory in /var/www/clients/client379/web455/web/includes/lib_base.php on line 3802)
Warning: file_put_contents(/var/www/clients/client379/web455/web//temp/static_caches/recommend_goods.php) [function.file-put-contents]: failed to open stream: No such file or directory in /var/www/clients/client379/web455/web/includes/lib_base.php on line 3802Warning: file_put_contents(/var/www/clients/client379/web455/web/temp/compiled/index.dwt.php) [function.file-put-contents]: failed to open stream: No such file or directory in /var/www/clients/client379/web455/web/includes/cls_template.php on line 784Notice: can't write:/var/www/clients/client379/web455/web/temp/compiled/index.dwt.php in /var/www/clients/client379/web455/web/includes/cls_template.php on line 790大致就这几条 failed to open stream: No such file or directory 的意思是: 未能打开流:没有这样的文件或目录这可错误不可屏蔽,必须找的错误原因,否则系统不可能正常运行 在错误信息提示的地方检查传给 file_put_contents 的文件名
这样是可以把部分警告给屏蔽了 比如:(Notice: can't write:/var/www/clients/client379/web455/web/temp/compiled/goods.dwt.php in /var/www/clients/client379/web455/web/includes/cls_template.php on line 790)这些提示没办法屏蔽
那么你可以在文件中运用ini_set("display_errors","Off");或者在php.ini中配置
error_reporting选项,参数如下:
http://www.w3school.com.cn/php/func_error_reporting.asp
提示一些警告 估计在某个地方关闭(Warning: file_put_contents(/var/www/clients/client379/web455/web//temp/static_caches/shop_config.php) [function.file-put-contents]: failed to open stream: No such file or directory in /var/www/clients/client379/web455/web/includes/lib_base.php on line 3802)
D_BUG?error_reporting(7):error_reporting(0);
set_magic_quotes_runtime(0);
在你的主文件里面 加上这一句话 试试
failed to open stream: No such file or directory 的意思是: 未能打开流:没有这样的文件或目录这可错误不可屏蔽,必须找的错误原因,否则系统不可能正常运行
在错误信息提示的地方检查传给 file_put_contents 的文件名
//禁用错误报告
error_reporting(0);//报告运行时错误
error_reporting(E_ERROR | E_WARNING | E_PARSE);//报告所有错误
error_reporting(E_ALL);
?>
我没搞懂,你这样试试 ,应该就是这个函数
比如:(Notice: can't write:/var/www/clients/client379/web455/web/temp/compiled/goods.dwt.php in /var/www/clients/client379/web455/web/includes/cls_template.php on line 790)这些提示没办法屏蔽
//往文件里面写东西
}
给程序加判断,能打开文件 就写,打不开就不写