我不想看手册,你用这个
$fp = fopen("a.html","r");
$str = fread($fp,filesize("a.html"));
fclose($fp);
$str = ereg_replace("\{Title\}","标题",$str);
echo $str;
$fp = fopen("a.html","r");
$str = fread($fp,filesize("a.html"));
fclose($fp);
$str = ereg_replace("\{Title\}","标题",$str);
echo $str;
只是,替换语句为
$htmlS=str_replace('{Title}',$title, $htmlS);
$htmlS=str_replace('{Csspath}',$csspath,$htmlS);
....
会用函数str_replace么?哪儿有你这么用的:
str_replace('{Title}','头文件', ...., $htmlS);