我要做的是检查图像的年龄,如果它超过 60 分钟,则运行另一个 php 页面来获取图像,否则如果小于 60 分钟,则什么也不做......
该脚本没有打开第二页(radartest.php)并运行它来更新图像,所以需要一个命令来告诉它作为脚本运行。
<?php
$imagename='./radar/auck0.png';
$cachetime = 3600;
//Start the caching of the images........
if (file_exists($imagename) and filemtime($imagename) + $cachetime > time()) {
echo("radartest.php");
} else {
null; //do nothing
}
?>