In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to turn on and off error prompts for php". Friends who are interested may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to turn on and off error tips for php".
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 on
Php_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, I believe you have a deeper understanding of "how to turn on and off the error prompt of php". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.