The following editor will bring you an article on the use of WHOOPS PHP debugging library. The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let’s follow the editor to take a look.
Whoops is an error capture and debugging PHP library suitable for PHP environments; whoops is very easy to use. It provides stackbased error capture and super beautiful error viewing. The test results are as follows
Installation steps (composer installation)
After the installation is completed, go to the current directory Create a new directory tools, create a new whoops.php in the tools directory, add the following code to register the monitoring class require
__DIR__."/../vendor/autoload.php"; $whoops = new \Whoops\Run; $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler); $whoops->register();
Then you can test it, the code is as follows, and the test rendering is as above
The above is the detailed content of Detailed explanation on the use of WHOOPS PHP debugging library. For more information, please follow other related articles on the PHP Chinese website!