This article introduces the use of WHOOPS PHP debugging library, which has certain reference value. Now I share it with everyone. Friends in need can refer to it
Whoops error capture suitable for PHP environment And debugging PHP library; whoops is very easy to use, it provides stackbased error capture and super beautiful error viewing test results are as follows
Installation steps (composer installation )
After the installation is completed, create a new directory tools in the current directory, create a new whoops.php in the tools directory, and 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 effect picture is as above
whoops official website http:// filp.github.io/whoops/
Related recommendations:
whoops What is the php debugging library
The above is the detailed content of Use of WHOOPS PHP debugging library. For more information, please follow other related articles on the PHP Chinese website!