如何解決strict standards php報(bào)錯(cuò)問(wèn)題

發(fā)布時(shí)間:2024-02-13
strict standards php報(bào)錯(cuò)的解決辦法:1、在父類(lèi)之后定義繼承類(lèi);2、在“setup-config.php”文件中添加“error_reporting( ~(e_strict | e_notice));”。
本文操作環(huán)境:windows7系統(tǒng),php5.3.3版,dell g3電腦。
如何解決strict standards php報(bào)錯(cuò)問(wèn)題?
php中strict standards錯(cuò)誤解決方法
在php5.3.3 中安裝wordpress 3.0.1 ,在安裝時(shí)出現(xiàn)錯(cuò)誤:
strict standards: php strict standards: declaration of walker…..的解決辦法:
出現(xiàn)錯(cuò)誤提示:
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 ……..
錯(cuò)誤原因:
這是由于 php 5.3版本后。要求繼承類(lèi)必須在父類(lèi)之后定義。否則就會(huì)出現(xiàn)strict standards: php strict standards: declaration of …. should be compatible with that of …. 的錯(cuò)誤提示。也就是說(shuō)必須父類(lèi)在前,繼承類(lèi)在后。
錯(cuò)誤參考頁(yè)面。
bugs點(diǎn)php點(diǎn)net/bug.php?id=46851 (不能發(fā)表帶鏈接的網(wǎng)址) 上面清楚地解釋了出現(xiàn)此類(lèi)錯(cuò)誤的具體原因。
解決辦法:
在wordpress3.0.1 文件中,找到 wp-admin\\\\setup-config.php 文件。
在require_once('../wp-includes/compat.php'); 上面添加一句:
error_reporting( ~(e_strict | e_notice));
問(wèn)題解決。
這句話的意思是錯(cuò)誤報(bào)告設(shè)置:顯示所有錯(cuò)誤,但是除了嚴(yán)格錯(cuò)檢查或者錯(cuò)誤報(bào)告。也就是說(shuō)php5.3.3 不執(zhí)行嚴(yán)格錯(cuò)誤檢查。也不顯示錯(cuò)誤提示。跳過(guò)嚴(yán)格錯(cuò)誤檢查。
推薦學(xué)習(xí):《php視頻教程》
上一個(gè):百度云服務(wù)器促銷(xiāo)
下一個(gè):如何選擇norgren圓筒氣缸公司的備品備件

水環(huán)式真空泵閥門(mén)的法蘭連接形式
域名黑名單-域名及賬戶(hù)問(wèn)題
家用買(mǎi)什么臺(tái)式電腦合適,最好的電腦牌子前十名
2022大學(xué)生村官報(bào)名(2022年大學(xué)生村官考試時(shí)間)
jjw(捷捷微)品牌介紹_jjw(捷捷微)產(chǎn)品采購(gòu)/價(jià)格查詢(xún)
銀杏樹(shù)樁的培植
電氣自動(dòng)化技術(shù)的優(yōu)勢(shì)分析
1210W2J0390T5E,J 1210 39R現(xiàn)貨購(gòu)買(mǎi),厚聲1210 39Ω ±5% 1/2W
電腦主機(jī)序列號(hào)怎么查,怎樣查看自己電腦的序列號(hào)
2013年macbook(蘋(píng)果macbook2013款)
十八禁 网站在线观看免费视频_2020av天堂网_一 级 黄 色 片免费网站_绝顶高潮合集Videos