Home  >  Article  >  Backend Development  >  Use of WHOOPS PHP debugging library

Use of WHOOPS PHP debugging library

不言
不言Original
2018-04-26 14:04:191543browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn