如何解决strict standards php报错问题

发布时间:2024-02-13
strict standards php报错的解决办法:1、在父类之后定义继承类;2、在“setup-config.php”文件中添加“error_reporting( ~(e_strict | e_notice));”。
本文操作环境:windows7系统,php5.3.3版,dell g3电脑。
如何解决strict standards php报错问题?
php中strict standards错误解决方法
在php5.3.3 中安装wordpress 3.0.1 ,在安装时出现错误:
strict standards: php strict standards: declaration of walker…..的解决办法:
出现错误提示:
strict standards: php strict standards: declaration of walker_page::start_lvl() should be compatible with that of walker::start_lvl() in e:\\\\webroot\\\\wordpress\\\\wp-includes\\\\classes.php on line 1199 php strict standards: declaration of walker_page::end_lvl() should be compatible with that of walker::end_lvl() in e:\\\\webroot\\\\wordpress\\\\wp-includes\\\\classes.php on line 1199 php strict ……..
错误原因:
这是由于 php 5.3版本后。要求继承类必须在父类之后定义。否则就会出现strict standards: php strict standards: declaration of …. should be compatible with that of …. 的错误提示。也就是说必须父类在前,继承类在后。
错误参考页面。
bugs点php点net/bug.php?id=46851 (不能发表带链接的网址) 上面清楚地解释了出现此类错误的具体原因。
解决办法:
在wordpress3.0.1 文件中,找到 wp-admin\\\\setup-config.php 文件。
在require_once('../wp-includes/compat.php'); 上面添加一句:
error_reporting( ~(e_strict | e_notice));
问题解决。
这句话的意思是错误报告设置:显示所有错误,但是除了严格错检查或者错误报告。也就是说php5.3.3 不执行严格错误检查。也不显示错误提示。跳过严格错误检查。
推荐学习:《php视频教程》
上一个:百度云服务器促销
下一个:如何选择norgren圆筒气缸公司的备品备件

水环式真空泵阀门的法兰连接形式
域名黑名单-域名及账户问题
家用买什么台式电脑合适,最好的电脑牌子前十名
2022大学生村官报名(2022年大学生村官考试时间)
jjw(捷捷微)品牌介绍_jjw(捷捷微)产品采购/价格查询
银杏树桩的培植
电气自动化技术的优势分析
1210W2J0390T5E,J 1210 39R现货购买,厚声1210 39Ω ±5% 1/2W
电脑主机序列号怎么查,怎样查看自己电脑的序列号
2013年macbook(苹果macbook2013款)