Strict standards: Non-static method cls_image::gd_version() should not be called statically in E:/SiteAll/bcty365.com/www/includes/lib_base.php on line346
這個錯誤的的處理是修改文件:E:/SiteAll/ZBPHP.COM/www/includes/cls_image.php 第693行,把
“function gd_version()” 改成“static function gd_version()” 即可。
Strict standards: Only variables should be passed by reference in E:/SiteAll/bcty365.com/www/includes/lib_main.php on line 1360
發現最新版本的PHP(PHP/5.4.16),有很多兼容問題,總是有報錯。其實原因是最新版的更嚴格。
發現有幾個地方:
1)類的靜態方法,前面必須有static修飾。不能直接寫public function fName(),前面必須加上static,否則報錯
2)類的繼承extends,子類的方法,如果父類也有,那么必須參數一致,否則也會報錯。Strict standards: Declaration of UrlPath::Goods() should be compatible with UrlBase::Goods($rs, $param = Array) in
補充:Strict standards: Only variables should be passed by reference in E:/SiteAll/bcty365.COM/www/includes/cls_template.php on line 418
將 $tag_sel = array_shift(explode(' ', $tag)); 修改為
<span style="font-size:18px;"> $tag_sel = explode(' ', $tag);
$tag_sel = array_shift($tag_sel);</span>
新聞熱點
疑難解答