安装ECShop2.7.3出现了一堆问题,主要是因为PHP版本過高引起的, 使用PHP5.5.x,ECShop安装完成出現了下面提示,特别是在cls_template.php文件中。下面就将需要替换的部分一一替换。经常性出现这样的问题:Deprecated: preg_replace(): The /e modifier is deprecated,use preg_replace_callback instead. 查找: return preg_replace("/{([^\}\{\n]*)}/e", "\$this->select('\\1');", $source); 替换为: return preg_replace_callback("/{([^\}\{\n]*)}/", function($r) { return $this->select($r[1]); }, $source); 查找: $out = ".*?/s'; $source = preg_replace_callback($pattern, function($ro) {return '{include file='.strtolower($ro[1]). '}';}, $source); 還有 Non-static method cls_image::gd_version() should not be called statically 在 inlcudes/lib_base.php 也會出現錯誤 查找: return cls_image::gd_version(); 替換為 $p = new cls_image(); return $p->gd_version(); 資料來源: 1. http://qiunile.com/90.html 2. http://www.cnblogs.com/thinksasa/archive/2013/03/12/2955922.html
文章標籤
全站熱搜
創作者介紹
創作者 peeress 的頭像
peeress

小鼻子小眼睛

peeress 發表在 痞客邦 留言(0) 人氣(66)