0
我無法訪問我的客戶端的生產服務器的php.ini,我需要隱藏PHP警告錯誤。這是可能的,如果是的話如何?有沒有辦法隱藏PHP的警告不訪問php.ini?
我無法訪問我的客戶端的生產服務器的php.ini,我需要隱藏PHP警告錯誤。這是可能的,如果是的話如何?有沒有辦法隱藏PHP的警告不訪問php.ini?
您可以使用的.htaccess隱藏的錯誤,請嘗試以下線路:
# supress php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
這個工作對我來說:
<?php
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
error_reporting(0);
?>
盧卡斯
的http://博客.teamtreehouse.com/5-新的功能的PHP-7 – b2ok