通过模板替换生成html文件,mvp其实效率不高的,一个人开发原生最快
$filename="10.html";
$fp=fopen($filename,'w+');
$filenameT="template.html";
$fpT=fopen($filenameT,'r');
$str2=fread($fpT,filesize($filenameT));
$shuming="中国水网";
$str2=str_replace('shuming',$shuming,$str2);
fwrite($fp,$str2);
fclose($fp);
fclose($fpT);
?>
//无用
<?
print "<p></p>";
$t = date(Y年m月d日);
//$f = fopen("note.txt","r");
//$msg = fread($f,filesize("note.txt"));
$main = "aaaaa";
$f = fopen("note.txt","w+");
fwrite($f,$main);
fclose($f);
print "<center><b><font color=#FF99FF>谢谢您的提交的资料!</font><br>";
?>
<?
print "<p></p>";
$t = date(Y年m月d日);
$f = fopen("note.txt","r");
$msg = fread($f,filesize("note.txt"));
$main = "姓名:$nickname<br>性别:$xingbie<br>年龄:$nianling <br>出生年月日:$cheshengnianyue<br>国籍:$guoji<br>民族:$minzu<br>宗教:$zongjiao<br>血型:$xuexing <br> 属相:$shuxiang<br> 教育程度:$jiaoyu<br> 居住地址:$dizhi<br> 身份证号:$shenfen<br> 您的固定电话:$guding<br> 手机:$shouji <br> Email:$email <br> 婚姻状况:$hunyin<br> 小孩:$xiaohai<br> 职业:$zhiye<br> 工作单位:$danwei<br> 驾驶证号:$zhenghao <br>驾龄:$jialing <br>所驾车型:$chexing <br>备注:$note <br><hr>"."\n".$msg;
$f = fopen("note.txt","w+");
fwrite($f,"<!--这里开始为一条新的客户信息-->".$main);
fclose($f);
print "<center><b><font color=#FF99FF>谢谢您的提交的资料!</font><br>";
?>
发表评论
木有头像就木JJ啦!还木有头像吗?点这里申请属于你的个性Gravatar头像吧!