PHP log error exception handling_PHP tutorial

WBOY
Release: 2016-07-13 17:44:36
Original
1053 people have browsed it

PHP outputs all error reports error_reporting=E_ALL setting

For example, warnings are not displayed error_reporting=E_ALL & ~E_WARNING

Use PHP function to set PHP.INI ini_set() such as

ini_set(“error_reporting”,E_ALL)

To get the value in PHP.ini, you can use the function ini_get()

Such as ini_get(“upload_max_filesize”)

PHP does not display error reports. Set display_errors=off in PHP.ini

We need to enable error reporting during the development phase, and do not enter any kind of error report during the running phase (use display_errors=Off)

Write error report to log

1: Specify the output error report error_reproting=E_ALL

2: Turn off error output display_errors=Off

3: Turn on the error log function log_errors = On

@By default, if the error log location is not specified, it will be written to the log of the web server by default

@Specify a file name for error_log (where the log is stored)

@The usage of writing to the operating system log is error_log=syslog


Rootexp

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478730.htmlTechArticlePHP outputs all error reports error_reporting=E_ALL settings, for example, does not display warnings error_reporting=E_ALL ~E_WARNING Use PHP functions to set PHP .INI ini_set() such as ini_set(error_reporting,E_AL...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template