<?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);
?>
file_get_contents -- 将整个文件读入一个字符串
file -- 把整个文件读入一个数组中
如对本文有疑问,
点击进行留言回复!!
相关文章:
-
-
-
-
-
-
-
荐
数据库的设计
数据库的设计一 为什么需要规范的数据库设计数据库设计的步骤收集信息标识实体标识每个实体需要存储的详细信息标识实体...
[阅读全文]
-
-
-
-
网友评论