From 9363a1b593a03c22e6bfbc76b8b5008f28de2992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=8F=8F?= <32321958+178146582@users.noreply.github.com> Date: Thu, 28 Jun 2018 16:28:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=BB=9F=E8=AE=A1=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.php | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/install.php b/install.php index 81f11e8..56e94a2 100644 --- a/install.php +++ b/install.php @@ -114,42 +114,12 @@ $config = "桥豆麻袋,你得先到后台配置一下基本信息才能使用en~en~

用户名:{$user}

密 码:您刚才设置的密码

"; - curl_get_https('https://img.52ecy.cn/service/record.php?url='.getWebUrl()); if (!@unlink('./install.php')){ $result .= '

警告:请手动删除根目录下安装文件:install.php

'; } $result .= "

访问首页 | 官方首页

"; Msg($result, 'no'); } -//不引函数库是有命名冲突,我懒的改 -/** - * 使用get方式请求指定页面 - * @param [type] $url [description] - * @return [type] [description] - */ -function curl_get_https($url){ - $curl = curl_init(); // 启动一个CURL会话 - curl_setopt($curl, CURLOPT_URL, $url); - curl_setopt($curl, CURLOPT_HEADER, 0); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); - $tmpInfo = curl_exec($curl); - curl_close($curl); - return $tmpInfo; -} -/** - * 获取站点地址 - */ -function getWebUrl() { - - $http_type = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://'; - $PHP_SELF=$_SERVER['SCRIPT_NAME']; - - $url = $http_type . $_SERVER['SERVER_NAME'] . substr($PHP_SELF,0,strrpos($PHP_SELF,'/')+1); - - return $url; -} /** 错消息提示 * $msg 提示信息 * $page 是否返回上一级 @@ -261,4 +231,4 @@ exit; - \ No newline at end of file +