如何使用.htaccess
隐藏网页中的所有控制台错误?
我目前使用的代码不工作
php_flag display_errors off
最佳答案
确保您的 .htaccess
被 Apache 考虑在内。只需将 .htaccess
放入:
# the following should issue a 500 error
LoremipsumdolorSITAMET
如果您的网站在放置上述乱码后仍然有效,则 Apache 未读取您的 .htaccess
。在这种情况下联系您的管理员
另一方面,如果您收到 500 错误
(或任何其他错误),请您的管理员允许在 .htaccess 中设置标志
关于.htaccess - 如何隐藏所有控制台错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15292986/