[8] ErrorException in Index.php line 179

未定义数组索引: user-agent

  1. return "签到成功";
  2. }
  3. public function index()
  4. {
  5. $lowie = ["MSIE 8.0","MSIE 7.0","MSIE 6.0","MSIE 5.0"];
  6. $ua = Request::instance()->header()["user-agent"];
  7. if($ua==""){return;}
  8. foreach ($lowie as $key => $value) {
  9. if( strstr($ua, $value) ){return '<script language="javascript" type="text/javascript">
  10. window.location.href="/ie.html";
  11. </script>';}
  12. }
  13. //Session::clear();die();

Call Stack

  1. in Index.php line 179
  2. at Error::appError(8, 'Undefined index: use...', '/home/wwwroot/23.225...', 179, ['lowie' => ['MSIE 8.0', 'MSIE 7.0', 'MSIE 6.0', ...]]) in Index.php line 179
  3. at Index->index()
  4. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 196
  5. at App::invokeMethod([object(Index), 'index'], []) in App.php line 408
  6. at App::module(['', null, null], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 295
  7. at App::exec(['type' => 'module', 'module' => ['', null, null]], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 123
  8. at App::run() in start.php line 18
  9. at require('/home/wwwroot/23.225...') in index.php line 24

Exception Datas

Error Context
lowie [ "MSIE 8.0", "MSIE 7.0", "MSIE 6.0", "MSIE 5.0" ]

Environment Variables

GET Data

page_id
22
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

HTTP_HOST
23.225.154.242
HTTP_ACCEPT
*/*
PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin
LD_LIBRARY_PATH
/usr/local/apache/lib
SERVER_SIGNATURE
<address>Apache Server at 23.225.154.242 Port 80</address>
SERVER_SOFTWARE
Apache
SERVER_NAME
23.225.154.242
SERVER_ADDR
23.225.154.242
SERVER_PORT
80
REMOTE_ADDR
98.130.0.185
DOCUMENT_ROOT
/home/wwwroot/23.225.154.242/public
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/home/wwwroot/23.225.154.242/public
SERVER_ADMIN
a@a.com
SCRIPT_FILENAME
/home/wwwroot/23.225.154.242/public/index.php
REMOTE_PORT
12304
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
page_id=22
REQUEST_URI
/?page_id=22
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1510965133.726
REQUEST_TIME
1510965133
Environment Variables
empty

ThinkPHP Constants

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