PHP error log

WBOY
Release: 2016-07-29 09:03:06
Original
1028 people have browsed it

In the development phase, all errors need to be displayed; while in the production phase, all errors need to be hidden and all errors logged

There are two ways to log errors

In php.ini

<code>log_errors = <span>On</span> | Off; <span>//设定是否记录日志</span>
errors_log = <span>'*.log'</span>; 
<span>//设定错误日志文件名,若没有给定路径,则在所有目录下生成日志文件</span><span>//error_log = syslog;</span><span>//将错误日志记录到系统中,windows系统下(事件查看器->windows日志->应用程序)</span></code>
Copy after login

Source In the code program

<code>ini_<span>set</span>(<span>'log_errors'</span>,On);
ini_<span>set</span>(<span>'errors_log'</span>,<span>'*.log'</span>);
//ini_<span>set</span>(<span>'errors_log'</span>,<span>'*.txt'</span>);
//ini_<span>set</span>(<span>'errors_log'</span>,syslog);</code>
Copy after login
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the error log recording in PHP, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!