㰲װˣôC:windowsиphp.iniӦø
ûװãôphp.ini-distΪphp.ini ƵC:windows
ҪʾϢãҪIE
/internetѡ//иʾѺõhttpϢȥ.
php.ini ļáӦѾúԼ php.ini ļںʵĿ¼У Linux ϰװ PHP Apache 2 ĵ˵ʾڵ PHP ӦóʱӦ֪ñĬֵ
display_errors = Off error_reporting = E_ALL |
ͨ php.ini ļǣԷǰĬֵdisplay_errors
Ŀĺ PHP ǷʾĬֵ Off
ǣҪÿ̸ɣֵΪ On
display_errors = On |
error_reporting
Ĭֵ E_ALL
ûʾӲʵʾϢE_ALL
ڿ˵е̫ϸΪĻΪһЩС£δʼҲʾʾֻ뿴ͲʵDz뿴ʾԣֵ error_reporting
Ĭֵ
error_reporting = E_ALL & ~E_NOTICE |
Apacheȫúˡѧϰ Apache ͬ¡
Apache Ĺ PHP дûΪڼϿж PHP 汾ʱ Apache ʹĸ PHP 汾Ϊ Apache ֻܲ鿴һ php.ini ļ֪ Apache ʹĸ php.ini ļԼһȫ⡣ǣһַ Apache PHP Ӷ֤ȷij
ң֪ڷЩñԷռ php.ini ļӶṩİȫԡ
Apache ʱӦѾӴ
Ҫ php.ini ļѾ£иӵ httpd.confκ php.ini ļ
php_flag display_errors on php_value error_reporting 2039 |
Ḳ php.ini ļΪ display_errors
Ѿõı־Լ error_reporting
ֵֵ 2039
E_ALL & ~E_NOTICE
Ը E_ALL
ֵΪ 2047
ͬҪ Apache
㰲װˣôC:windowsиphp.iniӦø
ûװãôphp.ini-distΪphp.ini ƵC:windows
ҪʾϢãҪIE
/internetѡ//иʾѺõhttpϢȥ
In the productive environment, it is suggested that you set display_errors=Off for security reasons. however, if you don't wanna change php.ini, an alternative way to do the same thing is to add 'error_reporting(0);' at the top of your specific program.