In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to set the error prompt in php.ini". In the daily operation, I believe that many people have doubts about how to set the error prompt in php.ini. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the question of "how to set up error prompt in php.ini". Next, please follow the editor to study!
Php.ini set error prompt method: 1, find and open the php.ini file; 2, find "display_errors = On" to change to "display_errors = off".
This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer
How does php.ini set the error prompt?
The setting method of opening error report in PHP configuration file php.ini
Windows system switch php error message
If you do not have permission to modify php.ini, you can add the following code to the php file:
The code is as follows
Ini_set ("display_errors", "On"); error_reporting (E_ALL | E_STRICT)
Of course, if you can modify php.ini, you can do the following:
The code is as follows
Find display_errors = On and change it to display_errors = off
Note: if you have copied the PHP.ini file to the windows directory, you must also change the display_errors = On in c:windows/php.ini to display_errors = off
The solution to the failure of display_errors = Off in PHP .ini
The method of turning on and off the error prompt in linux system is similar, but I will introduce it to you in detail.
Under the linux system
1. Open the php.ini file.
Take my ubuntu as an example, this file is in the: / etc/php5/a (www.jb51.net) pache2 directory.
two。 Search and modify the following line to change the off value to On
The code is as follows
Display_errors = Off
3. Search for downlink
The code is as follows
Error_reporting = E_ALL & ~ E_NOTICE
Or search for:
Error_reporting = E_ALL & ~ E_DEPRECATED
Modify to
Error_reporting = E_ALL | E_STRICT
4. Modify the httpd.conf of Apache
Take my Ubuntu as an example, this file is in the: / etc/apache2/ directory, this is a blank file.
Add the following two lines:
The code is as follows
Php_flag display_errors onphp_value error_reporting 2039
5. Restart Apache and you will OK.
Restart command:
The code is as follows
Sudo / etc/init.d/apache2 restart at this point, the study on "how to set the error prompt for php.ini" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.