Home > Backend Development > PHP Tutorial > php sends error log email php error reporting php error handling php error day

php sends error log email php error reporting php error handling php error day

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 08:49:17
Original
947 people have browsed it

① Looking for an application that can send emails online, I found a file called "sendmail.exe" under the Windows system. When downloading, go to the official website. It not only contains the exe execution program, but also various configurations.

②Configuration: In the sendmail.ini file, we take QQ mailbox as an example.

smtp_server=smtp.qq.com

smtp_port=465

smtp_ssl=auto

error_logfile=error.log

auth_username=29152 2145(email account)

auth_password=saturday123456(email password)

force_sender=291522145@qq.com

③Configure php.ini:

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.qq.com

sendmail_from = 291522145@qq.com

sendmail_path = "i :abcsendmailsendmail.exe -t"

mail.add_x_header = On

④php program:

<span><?php
</span><span><em>ini_set</em></span>(<span>'display_errors'</span>,<span>0</span>);
<span><em>error_reporting</em></span>(<span>-</span><span>1</span>);
<span><em>ini_set</em></span>(<span>'log_errors'</span>,<span>1</span>);
<span><em>error_log</em></span>(<span>'today ids rain'</span>,<span>1</span>,<span>'291522145@qq.com'</span>);
Copy after login

After everything is configured, restart the service, and then run the php program, you can find your qq mailbox There is an extra email.

The above introduces the error log email sent by php, including php and error content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template