In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the knowledge of "how to set up php error messages in ini_set". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Ini_set sets php error messages: 1, through "ini_set (" display_errors "," On ");" display error messages in the program; 2, through "ini_set (" max_execution_time "," 180 "); increase script execution time.
The operating environment of this paper: Windows7 system, PHP7.1, Dell G3.
How does ini_set set php error messages?
PHP sets the display error message and execution time through ini_set ()
PHP's ini_set function is the value in the setting option, which takes effect after the function is executed, and this setting becomes invalid at the end of the script. Not all options can be set by the function. Specific values can be set, you can check the list in the manual.
You can set the option values in php.ini, for example, the display_error option is off, but if you want to display error messages in the program to make it easier for you to debug the program, you can use the PHP ini_set function:
Ini_set ("display_errors", "On")
Then all the programs on your page will display error messages, and you can also use error_reporting to set the error message level displayed.
If you need to increase the execution time of the script, you can set:
Ini_set ("max_execution_time", "180")
Then the script execution time will be changed from the default 30 seconds to 180 seconds, of course, you can also use set_time_limit () to set.
In fact, if you combine the PHP ini_set function with ini_get, it's very good. For example, if you want to add your own include file path to the configuration file, but do you have permission to change php.ini, you can combine two functions:
Ini_set ('include_path', ini_get (' include_path'). ': / your_include_dir:'); this is the end of the content of "how ini_set sets up php error messages". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.