static.php 文件
$file = "static.html";
$ctime =filectime($file);
怎么将网页以html保存到文件夹中,$expr = 3600*24*10;//静态文件有效期,十天
if(file_exists($file)) {
if($ctime+$expr> time()){
echo file_get_contents($file);
htmlcss制作?}else{
unlink($file);//删除过期的静态页文件
ob_start();
//从数据库取出数据写入 static.html
js写入html。$content = ob_get_contents();
file_put_contents($file,$content);//写入内容到对应静态文件中
ob_end_flush();
}
htmlcss静态页面及代码?}else{
ob_start();
//从数据库取出数据写入 static.html
$content = ob_get_contents();
js写入本地文件。file_put_contents($file,$content);//写入内容到对应静态文件中
ob_end_flush();
}
?>
html+css、static.html 页面
静态页面版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态