Exemple #1
0
 public static function getVersion($force = false)
 {
     iFS::mkdir(PATCH_DIR);
     $tFilePath = PATCH_DIR . 'version.json';
     //临时文件夹
     if (iFS::ex($tFilePath) && time() - iFS::mtime($tFilePath) < 3600 && !$force) {
         $FileData = iFS::read($tFilePath);
     } else {
         $url = PATCH_URL . '/version.' . iPHP_APP . '.' . iCMS_VER . '.patch.' . iCMS_RELEASE . '?t=' . time();
         $FileData = iFS::remote($url);
         iFS::write($tFilePath, $FileData);
     }
     return json_decode($FileData);
     //版本列表
 }