脚本宝典收集整理的这篇文章主要介绍了如何在Silex Framework中调试php致命错误,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
<?PHP var_dump($app) ?>
这将导致WSOD(白屏死机).
use Symfony\component\Debug\ErrorHandler; use Symfony\Component\Debug\Debug; // Include the PRod configuration require __DIR__.'/prod.PHP'; // Enable PHP Error level error_reporting(E_ALL); ini_set('display_errors','On'); // Enable debug mode $app['debug'] = true; // Handle Fatal errors ErrorHandler::register(); Debug::enable();
“symfony / debug”:“~2.3”,
但仍然没有变化.我忘记了什么?
use Symfony\Component\HttpKernel\Debug\ErrorHandler; use Symfony\Component\HttpKernel\Debug\ExceptionHandler; // set the error handling ini_set('display_errors',1); error_reporting(-1); ErrorHandler::register(); if ('cli' !== PHP_sapi_name()) { ExceptionHandler::register(); } // inIT application $app = new Silex\Application(); // set debug mode $app['debug'] = true $app->run();
以上是脚本宝典为你收集整理的如何在Silex Framework中调试php致命错误全部内容,希望文章能够帮你解决如何在Silex Framework中调试php致命错误所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。