问题
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
回答1:
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.
来源:https://stackoverflow.com/questions/13655027/setting-display-error-php-configuration-in-htaccess