[8] ErrorException in User.phphtml line 40

未定义数组索引: HTTP_REFERER

  1. }
  2. }
  3. return $this->fetch();
  4. }
  5. //登录
  6. public function login() {
  7. if(!empty(session('user_message'))){
  8. echo "<script>title1=('您已登录!');history.back(-1);</script>";
  9. }
  10. $url = $_SERVER['HTTP_REFERER'];
  11. session('url',$url);
  12. $basic = Container::get('basic');
  13. if($this->request->isPost()){
  14. $data = $this->request->param();
  15. $data['password'] = md5($data['password']);
  16. $user_message = Db::table('user')->where(['email'=>$data['email'],'password'=>$data['password']])->find();
  17. if($user_message){
  18. session('user_message',$user_message);

Call Stack

  1. in User.phphtml line 40
  2. at Error::appError(8, 'Undefined index: HTT...', '/home/topstarktgo9p2...', 40, []) in User.phphtml line 40
  3. at User->login()
  4. at ReflectionMethod->invokeArgs(object(User), []) in Container.phphtml line 214
  5. at Container->invokeMethod([object(User), 'login'], []) in Module.phphtml line 124
  6. at Module->run() in App.phphtml line 362
  7. at App->run() in index.phphtml line 20

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
REDIRECT_REDIRECT_UNIQUE_ID XigmqPbo7PfNOp7sf4gRJgAAAAM
REDIRECT_REDIRECT_PHPRC /home/topstarktgo9p2s6t2afr/others
REDIRECT_REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID XigmqPbo7PfNOp7sf4gRJgAAAAM
REDIRECT_PHPRC /home/topstarktgo9p2s6t2afr/others
REDIRECT_HANDLER php-cgi
REDIRECT_STATUS 200
UNIQUE_ID XigmqPbo7PfNOp7sf4gRJgAAAAM
PHPRC /home/topstarktgo9p2s6t2afr/others
HTTP_X_FORWARDED_FOR 156.224.69.98
HTTP_X_REAL_IP 118.123.16.21
HTTP_HOST www.stratgrp.com
HTTP_CONNECTION close
HTTP_ACCEPT */*
HTTP_USER_AGENT Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)
PATH /sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE <address>Apache Server at www.stratgrp.com Port 80</address>
SERVER_SOFTWARE Apache
SERVER_NAME www.stratgrp.com
SERVER_ADDR 127.0.0.1
SERVER_PORT 80
REMOTE_ADDR 156.224.69.98
DOCUMENT_ROOT /home/topstarktgo9p2s6t2afr/wwwroot
REQUEST_SCHEME http
CONTEXT_PREFIX /php-run-as-cgi
CONTEXT_DOCUMENT_ROOT /usr/php7.1/bin
SERVER_ADMIN webmaster@topstar
SCRIPT_FILENAME /home/topstarktgo9p2s6t2afr/wwwroot/index.phphtml
REMOTE_PORT 59140
REDIRECT_URL /index.phphtml/login.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /login.html
SCRIPT_NAME /index.phphtml
PATH_INFO /login.html
PATH_TRANSLATED /home/topstarktgo9p2s6t2afr/wwwroot/login.html
ORIG_PATH_INFO /index.phphtml/login.html
ORIG_SCRIPT_NAME /php-run-as-cgi/php-cgi
ORIG_SCRIPT_FILENAME /usr/php7.1/bin/php-cgi
ORIG_PATH_TRANSLATED /home/topstarktgo9p2s6t2afr/wwwroot/index.phphtml/login.html
PHP_SELF /index.phphtml/login.html
REQUEST_TIME_FLOAT 1579689640.4807
REQUEST_TIME 1579689640
Environment Variablesempty
ThinkPHP Constants
APP_PATH /home/topstarktgo9p2s6t2afr/wwwroot/application/