首頁  >  文章  >  php教程  >  php自动生产静态页

php自动生产静态页

WBOY
WBOY原創
2016-06-21 08:51:25771瀏覽

 

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
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn