[8] ErrorException in class_guest_info.php line 5

未定义数组索引: HTTP_ACCEPT_LANGUAGE

  1. <?php
  2. namespace Ip;
  3. class class_guest_info{
  4. function GetLang() {
  5. $Lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 4);
  6. //使用substr()截取字符串,从 0 位开始,截取4个字符
  7. if (preg_match('/zh-c/i',$Lang)) {
  8. //preg_match()正则表达式匹配函数
  9. $Lang = '简体中文';
  10. }
  11. elseif (preg_match('/zh/i',$Lang)) {
  12. $Lang = '繁體中文';
  13. }
  14. else {
  15. $Lang = 'English';
  16. }
  17. return $Lang;
  18. }
  19. function GetBrowser() {

Call Stack

  1. in class_guest_info.php line 5
  2. at Error::appError(8, 'Undefined index: HTT...', '/home/huijinggroupah...', 5, []) in class_guest_info.php line 5
  3. at class_guest_info->GetLang() in common.php line 47
  4. at visit_stats() in Homebase.php line 13
  5. at Homebase->_initialize() in Controller.php line 59
  6. at Controller->__construct(object(Request))
  7. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 359
  8. at App::invokeClass('app\index\controller...') in Loader.php line 479
  9. at Loader::controller('index', 'controller', false, 'Error') in App.php line 579
  10. at App::module(['index', 'index', 'nr.jsp'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  11. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'nr.jsp']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  12. at App::run() in start.php line 19
  13. at require('/home/huijinggroupah...') in index.php line 19

Environment Variables

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

Server/Request Data

REDIRECT_REDIRECT_UNIQUE_ID
XimJJuEuETiVs-ezjvvKqQAAAAE
REDIRECT_REDIRECT_PHPRC
/home/huijinggroupahruri2jli3nagugar7oeu1p/others
REDIRECT_REDIRECT_STATUS
200
REDIRECT_UNIQUE_ID
XimJJuEuETiVs-ezjvvKqQAAAAE
REDIRECT_PHPRC
/home/huijinggroupahruri2jli3nagugar7oeu1p/others
REDIRECT_HANDLER
php-cgi
REDIRECT_STATUS
200
UNIQUE_ID
XimJJuEuETiVs-ezjvvKqQAAAAE
PHPRC
/home/huijinggroupahruri2jli3nagugar7oeu1p/others
HTTP_X_FORWARDED_FOR
154.197.217.200
HTTP_X_REAL_IP
61.139.126.228
HTTP_HOST
www.huijinggroup.com
HTTP_CONNECTION
close
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
deflate, gzip
PATH
/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE
<address>Apache Server at www.huijinggroup.com Port 80</address>
SERVER_SOFTWARE
Apache
SERVER_NAME
www.huijinggroup.com
SERVER_ADDR
127.0.0.1
SERVER_PORT
80
REMOTE_ADDR
154.197.217.200
DOCUMENT_ROOT
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot
REQUEST_SCHEME
http
CONTEXT_PREFIX
/php-run-as-cgi
CONTEXT_DOCUMENT_ROOT
/usr/php7.0/bin
SERVER_ADMIN
webmaster@huijinggroup
SCRIPT_FILENAME
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/index.php
REMOTE_PORT
58718
REDIRECT_URL
/index.php/nr.jsp
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/nr.jsp
SCRIPT_NAME
/index.php
PATH_INFO
/nr.jsp
PATH_TRANSLATED
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/nr.jsp
ORIG_PATH_INFO
/index.php/nr.jsp
ORIG_SCRIPT_NAME
/php-run-as-cgi/php-cgi
ORIG_SCRIPT_FILENAME
/usr/php7.0/bin/php-cgi
ORIG_PATH_TRANSLATED
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/index.php/nr.jsp
PHP_SELF
/index.php/nr.jsp
REQUEST_TIME_FLOAT
1579780391.0391
REQUEST_TIME
1579780391
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/application/
BIND_MODULE
index/index
THINK_VERSION
5.0.20
THINK_START_TIME
1579780391.0404
THINK_START_MEM
358072
EXT
.php
DS
/
THINK_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/thinkphp/
LIB_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/thinkphp/library/
CORE_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/thinkphp/library/think/
TRAIT_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/thinkphp/library/traits/
ROOT_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/
EXTEND_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/extend/
VENDOR_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/vendor/
RUNTIME_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/runtime/
LOG_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/runtime/log/
CACHE_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/runtime/cache/
TEMP_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/runtime/temp/
CONF_PATH
/home/huijinggroupahruri2jli3nagugar7oeu1p/wwwroot/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false