在首页开头加上

<?php ob_start(); ?>

在首页最下面加上

<?php
$info = ob_get_contents();
// 这个是这个页面的所有信息
$filectime = filectime("index.html");
// 这个index.html改成你需要的
if (!(time() - 3600 * 24 > $filectime)) {
    // 这个设置每天进行更换 3600*24是时间
    exit;
}
if ($handle = @fopen('index.html', 'w')) {
    // 这个index.html改成你需要的
    @fwrite($handle, $info);
    @fclose($handle);
}
?>

其中 3600*24 是一天的时间,3600 是 3600秒。24 是 24小时,可以根据需要更改自动更新时间。


Never give up your dreams.