preg_replace换成preg_replace_callback
function fetch_str($source){
$source = $this->smarty_prefilter_preCompile($source);
return preg_replace(“/{([^\}\{\n]*)}/e”, “\$this->select(‘\\1’)本¥文来源gaodai$ma#com搞$代*码*网(搞代gaodaima码;”, $source);
}
——解决思路———————-
return preg_replace_callback("/{([^\}\{\n]*)}/", <br /> function($m) {<br /> return $this->select($m[1]);<br /> }, $source);
分行写只是为了看得清楚