设置在.htaccess display_error PHP配置 [英] Setting display_error PHP configuration in .htaccess

查看:151
本文介绍了设置在.htaccess display_error PHP配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图禁止从的.htaccess 的display_errors,但如果我只是粘贴到的.htaccess 文件中,整个站点崩溃了:

 的php_flag display_errors设置关闭
的php_flag log_errors上
 

解决方案

如果PHP编译为Apache模块,你有权限更改这些这只作品。

如果你正在使用PHP> = 5.3,有更好的解决办法:在你的文档根目录下创建 .user.ini 文件,并使用正常的INI语法来定制你的配置。

I'm trying to disable display_errors from .htaccess, but if I just paste this into the .htaccess file, the entire site crashes:

php_flag display_errors off
php_flag log_errors on

解决方案

This only works if php is compiled as apache module and you have privileges to change those.

If you are using php >= 5.3, there is better solution: create .user.ini file in your document root and use normal ini syntax to customize your config.

这篇关于设置在.htaccess display_error PHP配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆