如何在 .htaccess 文件中禁用 PHP 中的通知和警告? [英] How can I disable notices and warnings in PHP within the .htaccess file?

查看:28
本文介绍了如何在 .htaccess 文件中禁用 PHP 中的通知和警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想打开 PHP 错误并禁用 PHP 文件中的所有通知和警告.

I just want to only turn on PHP errors and disable all notices and warnings in PHP files.

推荐答案

这可能不是最好的做法.你至少需要检查一下你的 PHP 错误日志是否有问题;)

It is probably not the best thing to do. You need to at least check out your PHP error log for things going wrong ;)

# PHP error handling for development servers
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_flag log_errors on
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
php_value docref_ext 0
php_value error_log /home/path/public_html/domain/PHP_errors.log
php_value error_reporting -1
php_value log_errors_max_len 0

这篇关于如何在 .htaccess 文件中禁用 PHP 中的通知和警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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