本文主要是介绍ecshop手机端错误修改,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in uploads\include\library\EcsTemplate.class.php on line 248
解决:
return preg_replace("/{([^\}\{\n]*)}/e", "\$this->select('\\1');", $source);
改为: return preg_replace_callback("/{([^\}\{\n]*)}/", function($r) { return $this->select($r[1]); }, $source);
2.E:\work\server\ECTouch\uploads\include\library\EcsTemplate.class.php on line 912
解决:
$pattern='/<!--\s#BeginLibraryItem\s\"\/(.*?)\"\s-->.*?<!--\s#EndLibraryItem\s-->/se';
$replacement = "'{include file='.strtolower('\\1'). '}'";
$source = preg_replace($pattern, $replacement, $source);
改为:
$pattern='/<!--\s#BeginLibraryItem\s\"\/(.*?)\"\s-->.*?<!--\s#EndLibraryItem\s-->/s';
$source = preg_replace_callback($pattern, function($ro){return '{include file='.strtolower($ro[1]). '}';}, $source);
这篇关于ecshop手机端错误修改的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!