- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業務經營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯網協會理事單位
- 安全聯盟認證網站身份V標記
- 域名注冊服務機構許可:滇D3-20230001
- 代理域名注冊服務機構:新網數碼
ecshop因php版本過高引起的7報錯這個是因高版本的php已經不支持舊版本的一些方法與函數了,我們下面來看一篇關于ecshop因php版本過高引起錯誤的問題解決辦法。
ecshop兼容PHP版本較低,不兼容PHP更高的版本,如果使用其他版本可能會出現各種錯誤,如以下七種錯誤問題:
1、Strict Standards: Non-static method cls_image::gd_version() should not be called statically
未聲明靜態static將
return cls_image::gd_version();
替換為
$p = new cls_image(); return $p->gd_version();
2、Strict Standards: Only variables should be passed by reference
變量應該通過引用傳遞將
$tag_sel = array_shift(explode(' ', $tag));
替換為
$tag_arr = explode(' ', $tag); $tag_sel = array_shift($tag_arr);
3、Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in
將
return preg_replace("/{([^}{ ]*)}/e", "$this->sel ect('\1');", $source);
替換為
return preg_replace_callback ("/{([^}{ ]*)}/", function($r) { return $this->sel ect($r[1]); }, $source);
4、Strict Standards: Redefining already defined constructor for class paypal
PHP 類,有兩種構造函數,一種是跟類同名的函數,一種是 ____construct()。從PHP5.4開始,對這兩個函數出現的順序做了最嚴格的定義,必須是 ____construct() 在前,同名函數在后。
例如:
function __construct() { $this->paypal(); } function paypal() { }
5、mktime(): You should be using the time() function instead
mktime()方法不帶參數被調用,將
$auth = mktime();
替換為
$auth = time();
6、Strict Standards: Declaration of vbb::set_cookie() should be compatible with integrate::set_cookie($username = '', $remember = NULL)
子類的函數跟父類的同名,必須使子類的函數參數跟父類的對應函數參數個數相同
依據錯誤提示,修改例如:
function set_cookie ($username="")
改為
function set_cookie ($username="", $remember = NULL)
7、Parse error: syntax error, unexpected ';'
語法錯誤,缺少;或者echo沒有輸出值
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP