Use PHP to capture zookeeper in the original PHP repository immediately and send email notifications. javaemail sends

Source: Internet
Author: User

Use PHP to capture zookeeper in the original PHP repository immediately and send email notifications. javaemail sends

All the friends who develop PHP know that, in fact, the most worrying thing is that the program has some frequently-used or frequently-used vulnerabilities, in these cases, if a user attempts to use a role, the user will be assigned to the role administrator, or even the employee will be working for this purpose, if you do not attempt to log on to the screen, you have to try to log on to the Daily website. However, not everyone seems to have checked the Daily website, in order to understand the problem that has solved this problem, I wrote this generation, the intention is to capture the internal content when our php program is released and then send it to our email.
First look at the effect:

 

Define ('sys _ debug', false); IF (SYS_DEBUG) {ini_set ('display _ errors ', 'on'); Error_reporting (E_ALL ); // set Error_reporting (E_ERROR | E_WARNING | E_PARSE) using the setting after the upload;} Else {ini_set ('display _ errors ', 'off'); Error_reporting (0 );} // zookeeper captures Register_shutdown_function ('fun: error'); Class Fun {/** general output handler parameter: content to be exported, whether to stop the program: when there is a threshold value, the function can be used to specify the custom internal volume content. In addition, it can be used with Register_shutdown_function to automatically capture internal volume content, and send the captured response content to the Email body Register_shutdown_fun. The mechanism of ction is to use the function data when the program completes the loading or when the program exits. If the function data is automatically captured during the loading, in this case, the last outbound content will be obtained. If no internal content exists, the system will jump out and return: The content will be directly exported to the screen or Email usage: fun: Error ('internal internal content'); Fun: Error ('internal internal content', False ); /**/Public Static Function Error ($ M = '', $ E = True) {$ ErrTpl = '

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.