[8] ErrorException in User.php line 86

未定义数组索引: HTTP_REFERER

  1. public function en_loginout() {
  2. session('user_message',null);
  3. $this->redirect('index/english/en_index');
  4. }
  5. //登录
  6. public function en_login() {
  7. if(!empty(session('user_message'))){
  8. echo "<script>alert('You have been logged in!');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);
  19. return $basic->rmsg('Congratulations on your success!','1','json');

Call Stack

  1. in User.php line 86
  2. at Error::appError(8, 'Undefined index: HTT...', '/www/wwwroot/sino.ia...', 86, []) in User.php line 86
  3. at User->en_login()
  4. at ReflectionMethod->invokeArgs(object(User), []) in Container.php line 214
  5. at Container->invokeMethod([object(User), 'en_login'], []) in Module.php line 124
  6. at Module->run() in App.php line 362
  7. at App->run() in index.php line 20

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST www.topstartech.cn
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO /en_login.html
REDIRECT_STATUS 200
SERVER_NAME www.topstartech.cn
SERVER_PORT 80
SERVER_ADDR 172.28.170.82
REMOTE_PORT 37820
REMOTE_ADDR 3.230.162.238
SERVER_SOFTWARE nginx/1.22.0
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/sino.iamler.com
DOCUMENT_URI /index.php
REQUEST_URI /en_login.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/en_login.html
SCRIPT_FILENAME /www/wwwroot/sino.iamler.com/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711623606.0227
REQUEST_TIME 1711623606
Environment Variablesempty
ThinkPHP Constants
APP_PATH /www/wwwroot/sino.iamler.com/application/