Home > php教程 > php手册 > body text

php自动生产静态页

WBOY
Release: 2016-06-21 08:51:25
Original
799 people have browsed it

 

01 if(file_exists("./index.htm"))//看静态index.htm文件是否存在{

02     $time=time();

03  

04     //文件修改时间和现在时间相差?的话,直接导向htm文件,否则重新生成htm

05     if($time-filemtime("./index.htm")

06         header("Location:classhtml/main.htm");

07     }

08 }

09  

10 //在你的开始处加入ob_start();

11 ob_start();

12
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template