diff --git a/admin/head.php b/admin/head.php index 8fb34dd..a3583e3 100644 --- a/admin/head.php +++ b/admin/head.php @@ -1,6 +1,7 @@ window.location.href='./login.php';"); +$update = update(); //检查更新 ?> diff --git a/include/function.php b/include/function.php index 1722059..314b6ff 100644 --- a/include/function.php +++ b/include/function.php @@ -87,8 +87,11 @@ function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) { } } +function update() { $update_host = 'cdn.lylme.com'; //程序更新服务器,请勿删除和修改,否则将导致无法接收版本更新和报错 -if(@$update = json_decode(file_get_contents('https://'.$update_host.'/lylmes_page/update.json'), true)){} +@$update = json_decode(file_get_contents('https://'.$update_host.'/lylmes_page/update.json'), true); +return $update; +} function getver($ver){ $vn=explode('.',str_replace('v','',$ver));