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 = '