ECSHOP 商城preg_replace()替换为preg_replace_callback()

在cls_template.php 1072行替换的时候如果报错preg_replace_callback(): Modifier /e cannot be used with replacement callback错误,就需要把

$pattern     = '/<!--\s#BeginLibraryItem\s\"\/(.*?)\"\s-->.*?<!--\s#EndLibraryItem\s-->/es';

改为(把/es改为/s)

$pattern     = '/<!--\s#BeginLibraryItem\s\"\/(.*?)\"\s-->.*?<!--\s#EndLibraryItem\s-->/s';

 

posted @ 2015-11-24 16:28  stupboy  阅读(604)  评论(0编辑  收藏  举报