将下列代码保存为 task.php ,然后在主页的静态HTML结尾引入下面的JS。
<scriptlanguage="javascript"src="task.php"></script>
06 |
$dmPageName = "index.php" ; |
08 |
$stPageName = "index.html" ; |
12 |
$tureStFile =dirname( __FILE__ ). '/' . $stPageName ; $ftime =@ filemtime ( $tureStFile ); if (! file_exists ( $tureStFile )||( $ftime <time()- $mkTime )){ $body = file_get_contents ( $baseCmsUrl . '/' . $dmPageName ); $fp = fopen ( $tureStFile , 'w' );fwrite( $fp , $body );fclose( $fp );} |
|
06 |
$dmPageName = "index.php" ; |
08 |
$stPageName = "index.html" ; |
12 |
$tureStFile =dirname( __FILE__ ). '/' . $stPageName ; $ftime =@ filemtime ( $tureStFile ); if (! file_exists ( $tureStFile )||( $ftime <time()- $mkTime )){ $body = file_get_contents ( $baseCmsUrl . '/' . $dmPageName ); $fp = fopen ( $tureStFile , 'w' );fwrite( $fp , $body );fclose( $fp );} |
本文出自:亿恩科技【www.enkj.com】
服务器租用/服务器托管中国五强!虚拟主机域名注册顶级提供商!15年品质保障!--亿恩科技[ENKJ.COM]
|