您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

正则替换有关问题

2024/3/21 5:18:48发布32次查看
正则替换问题
$compilecontent = preg_replace(/(\{cm:)include\s*(.+)(\})/i, \$this->inc_file('$2'), $compilecontent);
现在 $this->inc_file('$2') 被当做字符串替换了
如何用 $this->inc_file('$2') 返回的结果替换呢
------解决方案--------------------
$compilecontent = preg_replace(/(\{cm:)include\s*(.+)(\})/ie, \$this->inc_file('$2'), $compilecontent);
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product