[8] ErrorException in IndexController.php line 23

未定义数组索引: HTTP_REFERER

  1. class IndexController extends PluginBaseController
  2. {
  3. function index()
  4. {
  5. $this->config = $this->getPlugin('Qqlogin')->getConfig();
  6. $appid = $this->config['appid'];
  7. $appkey = $this->config['appkey'];
  8. $redirect_uri = cmf_plugin_url('Qqlogin://Index/index',array(),true);
  9. if (!isset($_GET['code'])) {
  10. $redirect_uri = $redirect_uri . "?back_url=" . urlencode($_SERVER['HTTP_REFERER']);
  11. session('login_http_referer', $_SERVER['HTTP_REFERER']);
  12. $state = md5(uniqid(rand(), true));
  13. $scope = 'get_user_info';
  14. $login_url = "https://graph.qq.com/oauth2.0/authorize?scope={$scope}&state={$state}&response_type=code&client_id={$appid}&redirect_uri={$redirect_uri}";
  15. header('Location:'.$login_url);
  16. } else {
  17. $code = $_GET['code'];
  18. if (empty($code)) {echo 'Error Get Authorization Code';exit();}
  19. $urldata = get_url_contents("https://graph.qq.com/oauth2.0/token?grant_type=authorization_code&client_id={$appid}&client_secret={$appkey}&code={$code}&redirect_uri={$redirect_uri}");

Call Stack

  1. in IndexController.php line 23
  2. at Error::appError(8, 'Undefined index: HTT...', '/usr/home/byu7439760...', 23, ['appid' => '101883281', 'appkey' => '70bdadf0ca0e8556ccc5...', 'redirect_uri' => 'http://www.myisic.ne...']) in IndexController.php line 23
  3. at IndexController->index()
  4. at ReflectionMethod->invokeArgs(object(IndexController), []) in App.php line 343
  5. at App::invokeMethod(['plugins\qqlogin\cont...', 'index', []]) in PluginController.php line 26
  6. at PluginController->index('qqlogin', 'Index', 'index')
  7. at ReflectionMethod->invokeArgs(object(PluginController), ['qqlogin', 'index', 'index']) in App.php line 343
  8. at App::invokeMethod(['\cmf\controller\Plug...', 'index'], ['_plugin' => 'qqlogin', '_controller' => 'index', '_action' => 'index']) in App.php line 470
  9. at App::exec(['type' => 'method', 'method' => ['\cmf\controller\Plug...', 'index'], 'var' => []], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...]) in App.php line 139
  10. at App::run() in index.php line 41

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

DOCUMENT_ROOT
/usr/home/byu7439760001/htdocs
GATEWAY_INTERFACE
CGI/1.1
HTTP_ACCEPT
*/*
HTTP_HOST
www.myisic.net
HTTP_USER_AGENT
claudebot
PATH
/bin
PHPRC
/var/www/php70/hichina_ini/byu7439760001
QUERY_STRING
s=plugin/qqlogin/index/index.html
REDIRECT_DOCUMENT_ROOT
/usr/home/byu7439760001/htdocs
REDIRECT_GATEWAY_INTERFACE
CGI/1.1
REDIRECT_HTTP_ACCEPT
*/*
REDIRECT_HTTP_HOST
www.myisic.net
REDIRECT_HTTP_USER_AGENT
claudebot
REDIRECT_PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REDIRECT_PATH_INFO
/qqlogin/index/index.html
REDIRECT_PATH_TRANSLATED
redirect:/index.php/index/index.html
REDIRECT_QUERY_STRING
s=plugin/qqlogin/index/index.html
REDIRECT_REMOTE_ADDR
3.239.52.235
REDIRECT_REMOTE_PORT
52744
REDIRECT_REQUEST_METHOD
GET
REDIRECT_REQUEST_URI
/plugin/qqlogin/index/index.html
REDIRECT_SCRIPT_FILENAME
/usr/home/byu7439760001/htdocs/plugin
REDIRECT_SCRIPT_NAME
/plugin
REDIRECT_SCRIPT_URI
http://www.myisic.net/plugin/qqlogin/index/index.html
REDIRECT_SCRIPT_URL
/plugin/qqlogin/index/index.html
REDIRECT_SERVER_ADDR
10.21.8.51
REDIRECT_SERVER_ADMIN
webmaster@byu7439760001.my3w.com
REDIRECT_SERVER_NAME
www.myisic.net
REDIRECT_SERVER_PORT
80
REDIRECT_SERVER_PROTOCOL
HTTP/1.1
REDIRECT_SERVER_SIGNATURE
REDIRECT_SERVER_SOFTWARE
Apache
REDIRECT_STATUS
200
REDIRECT_TZ
Asia/Shanghai
REDIRECT_UNIQUE_ID
Zga7owoVCDMAE9Dx3OkAAAAK
REDIRECT_URL
/plugin/qqlogin/index/index.html
REMOTE_ADDR
3.239.52.235
REMOTE_PORT
52744
REQUEST_METHOD
GET
REQUEST_URI
/plugin/qqlogin/index/index.html
SCRIPT_FILENAME
/usr/home/byu7439760001/htdocs/index.php
SCRIPT_NAME
/index.php
SCRIPT_URI
http://www.myisic.net/plugin/qqlogin/index/index.html
SCRIPT_URL
/plugin/qqlogin/index/index.html
SERVER_ADDR
10.21.8.51
SERVER_ADMIN
webmaster@byu7439760001.my3w.com
SERVER_NAME
www.myisic.net
SERVER_PORT
80
SERVER_PROTOCOL
HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
TZ
Asia/Shanghai
UNIQUE_ID
Zga7owoVCDMAE9Dx3OkAAAAK
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711717283.3311
REQUEST_TIME
1711717283
PATH_INFO
plugin/qqlogin/index/index.html
Environment Variables
empty

ThinkPHP Constants

APP_DEBUG
true
CMF_ROOT
/usr/home/byu7439760001/htdocs/
APP_PATH
/usr/home/byu7439760001/htdocs/app/
CMF_PATH
/usr/home/byu7439760001/htdocs/simplewind/cmf/
PLUGINS_PATH
/usr/home/byu7439760001/htdocs/plugins/
EXTEND_PATH
/usr/home/byu7439760001/htdocs/simplewind/extend/
VENDOR_PATH
/usr/home/byu7439760001/htdocs/simplewind/vendor/
RUNTIME_PATH
/usr/home/byu7439760001/htdocs/data/runtime/
THINKCMF_VERSION
5.0.180901
THINK_VERSION
5.0.20
THINK_START_TIME
1711717283.3317
THINK_START_MEM
351160
EXT
.php
DS
/
THINK_PATH
/usr/home/byu7439760001/htdocs/simplewind/thinkphp/
LIB_PATH
/usr/home/byu7439760001/htdocs/simplewind/thinkphp/library/
CORE_PATH
/usr/home/byu7439760001/htdocs/simplewind/thinkphp/library/think/
TRAIT_PATH
/usr/home/byu7439760001/htdocs/simplewind/thinkphp/library/traits/
ROOT_PATH
/usr/home/byu7439760001/htdocs/
LOG_PATH
/usr/home/byu7439760001/htdocs/data/runtime/log/
CACHE_PATH
/usr/home/byu7439760001/htdocs/data/runtime/cache/
TEMP_PATH
/usr/home/byu7439760001/htdocs/data/runtime/temp/
CONF_PATH
/usr/home/byu7439760001/htdocs/app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
HTMLPURIFIER_PREFIX
/usr/home/byu7439760001/htdocs/simplewind/vendor/ezyang/htmlpurifier/library
QINIU_FUNCTIONS_VERSION
7.2.5
0.095838s