[8] ErrorException in config.php line 12

Undefined index: HTTP_ACCEPT_LANGUAGE

  1. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  2. // +----------------------------------------------------------------------
  3. // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
  4. // +----------------------------------------------------------------------
  5. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  6. // +----------------------------------------------------------------------
  7. // | Author: liu21st <liu21st@gmail.com>
  8. // +----------------------------------------------------------------------
  9. $lan = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,5);
  10. // var_dump(strtolower($lan));
  11. $a = null;
  12. if (strtolower($lan) === "zh-cn"){
  13. $a = 'cn';
  14. } //这里要处理一下,因为得到的结果包含有大写字母
  15. else{
  16. $a = 'en';
  17. }

Call Stack

  1. in config.php line 12
  2. at Error::appError(8, 'Undefined index: HTT...', '/www/wwwroot/latex/a...', 12, ['file' => '/www/wwwroot/latex/p...', 'name' => '', 'range' => '_sys_', ...]) in config.php line 12
  3. at include('/www/wwwroot/latex/a...') in Config.php line 80
  4. at Config::load('/www/wwwroot/latex/p...') in App.php line 249
  5. at App::init() in App.php line 182
  6. at App::initCommon() in App.php line 82
  7. at App::run() in start.php line 19
  8. at require('/www/wwwroot/latex/t...') in index.php line 17

Environment Variables

GET Data

s
/en/aboutus/index.html
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/latex/public/index.php
QUERY_STRING
s=/en/aboutus/index.html
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/en/aboutus/index.html
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/www/wwwroot/latex/public
SERVER_PROTOCOL
HTTP/2.0
REQUEST_SCHEME
https
HTTPS
on
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.15.10
REMOTE_ADDR
44.206.227.65
REMOTE_PORT
53100
SERVER_ADDR
172.19.40.244
SERVER_PORT
443
SERVER_NAME
latex.cn
REDIRECT_STATUS
200
PATH_INFO
HTTP_HOST
latex.cn
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711639104.0099
REQUEST_TIME
1711639104
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/latex/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711639104.0103
THINK_START_MEM
259664
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/latex/thinkphp/
LIB_PATH
/www/wwwroot/latex/thinkphp/library/
CORE_PATH
/www/wwwroot/latex/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/latex/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/latex/
EXTEND_PATH
/www/wwwroot/latex/extend/
VENDOR_PATH
/www/wwwroot/latex/vendor/
RUNTIME_PATH
/www/wwwroot/latex/runtime/
LOG_PATH
/www/wwwroot/latex/runtime/log/
CACHE_PATH
/www/wwwroot/latex/runtime/cache/
TEMP_PATH
/www/wwwroot/latex/runtime/temp/
CONF_PATH
/www/wwwroot/latex/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false