As a monitoring system, you need to monitor a certain page, you can make a number of ways to alarm, such as: normal output a specified variable, the error is not output. But there is a much more convenient way to use headers to throw information directly in the current error, such as:
However, just throw such a message, the solution to the problem is a little help and no, of course, the more information you want to capture the better, you can view the page according to certain rules, and the page output the specific error message. There may be more than one error, if each encounter an error to throw a header information, then PHP will produce a lot of warning, which is not compliant, workaround, use buffer to receive information, the final unified output can:
Ob_start (); Open buffer #coding here#...ob_end_flush (); Output all content to browser
In this way, you can capture all of the information, and you won't have to use the header's warning multiple times!
Alarm system: PHP output header information to facilitate script crawling information