以下两行给出警告,
if (eregi($patt,$v,$res))
Deprecated: Function eregi() is deprecated in /classes/xtpl.php on line 50
和
$copy=ereg_replace("\{".$v."\}","$var",$copy);
Deprecated: Function ereg_replace() is deprecated in /classes/xtpl.php on line 25
我尝试使用preg_match()
以下方式,但无法解决问题
$copy=preg_match("\{".$v."\}","$var",$copy);
if (preg_match($patt,$v,$res))
请给出一些想法