删除PHP中的警告消息 [英] Remove warning messages in PHP

查看:78
本文介绍了删除PHP中的警告消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些PHP代码.当我运行它时,会出现一条警告消息.

I have some PHP code. When I run it, a warning message appears.

如何删除/禁止/忽略这些警告消息?

How can I remove/suppress/ignore these warning messages?

推荐答案

您确实应该修复引起警告的所有内容,但是可以使用

You really should fix whatever's causing the warning, but you can control visibility of errors with error_reporting(). To skip warning messages, you could use something like:

error_reporting(E_ERROR | E_PARSE);

这篇关于删除PHP中的警告消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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