Пример #1
0
 function getVersion($force = false)
 {
     FS::mkdir(PATCH_DIR);
     $tFilePath = PATCH_DIR . 'version.txt';
     //临时文件夹
     if (FS::exists($tFilePath) && time() - FS::mtime($tFilePath) < 3600 && !$force) {
         $FileData = FS::read($tFilePath);
     } else {
         $FileData = FS::remote(PATCH_URL . '/version.txt');
         FS::write($tFilePath, $FileData);
     }
     return explode("\n", $FileData);
     //版本列表
 }