如何在代码输出中显示PHP错误? [英] How to display PHP errors in code output?

查看:70
本文介绍了如何在代码输出中显示PHP错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过浏览器执行PHP页面时,我们只会得到输出,而不会得到代码中的错误.

When executing a PHP page through browser , we will just get the output but not the errors in code.

我如何查看后端代码所发生的错误?

how can i view the errors occurred by the code in the backend??

我在代码中使用以下代码进行错误报告.

I am using the following in the code for error reporting..

error_reporting(E_ALL | E_ALL);

推荐答案

ini_set('display_errors', 1);
error_reporting(E_ALL ^ E_NOTICE);

这篇关于如何在代码输出中显示PHP错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆