1. 首页
  2. 数据库
  3. 其它
  4. PHP读写文件的方法(生成HTML)

PHP读写文件的方法(生成HTML)

上传者: 2020-12-23 03:08:50上传 PDF文件 31.1KB 热度 10次
<?php //生成HTML $countfile=”template.html”; $num=file_get_contents($countfile); echo $num; $num=str_replace(“|*|*|PAGE_TITLE|*|*|”,”myhome”,$num); $path=”template.html”; $handle=fopen($path,”w”); //写入方式打开新闻路径 fwrite($handle,$num); //把刚才替换的内容写进生成的HTML文件 fclose($handle); ?&
下载地址
用户评论