-1
我想这个函数来preg_replace_callback但几乎我都试过了转换提供了错误:套牢了preg_replace()来Preg_replace_callback()
需要参数2,“$ DB->模块”,是在
这是一个有效的回调是我的代码:?
$this->template = preg_replace ("/#module\=(\w+)#/ie", "\$this->module('\\1')", $this->template);
任何想法如何将它转换..
回调函数是一个函数,关于http://php.net/manual/en/function.preg-replace-callback.php – Calimero
应仔细选择哪些参数和返回值我将重新打开这个问题,因为它是一个在这种情况下需要使用类方法的回调函数。 –