似乎无法关闭在PHP德precated错误 [英] Can't seem to turn off deprecated errors in php

查看:180
本文介绍了似乎无法关闭在PHP德precated错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即时通讯使用PHP的版本不支持 mysql_connect开发服务器上()我们的生产服务器做。我曾尝试:的error_reporting = E_ALL ^​​ E_DE preCATED ,但它不工作。重新启动后的Apache我还是去precated错误消息。

Im on a development server using a version of php that doesn't support mysql_connect() our production server does. I have tried: error_reporting = E_ALL ^ E_DEPRECATED but it doesn't work. After restarting Apache I still the deprecated error message.

我有机会获得ini文件我不应该需要的PHP函数来改变错误报告。这也是一个字preSS。

I have access to the ini file I should not need php functions to change the error reporting. this is also for wordpress.

推荐答案

使用error_reporting()是一个函数。尝试:使用error_reporting(E_ALL ^​​ E_DE $ P $ ^ pCATED E_USER_DE preCATED); 。或的ini_set(把error_reporting,E_ALL&安培;〜E_DE preCATED); 。然后测试回声 ini_get(使用error_reporting的设置); 。最小的PHP版本必须为5.3.0了点。

error_reporting() is a function. Try: error_reporting(E_ALL ^ E_DEPRECATED ^ E_USER_DEPRECATED);. Or ini_set("error_reporting", E_ALL & ~E_DEPRECATED);. Then test the settings with echo ini_get("error_reporting");. Minimal PHP version must be 5.3.0 for that.

这篇关于似乎无法关闭在PHP德precated错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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