[8] ErrorException in Base.php line 45

未定义数组索引: HTTP_USER_AGENT

  1. // $content = $this->fetch($templateFile);
  2. // $htmlpath = !empty($htmlpath)?$htmlpath:HTML_PATH;
  3. // $htmlfile = $htmlpath.$htmlfile.C('HTML_FILE_SUFFIX');
  4. // Storage::put($htmlfile,$content,'html');
  5. // return $content;
  6. //}
  7. public function _initialize() {
  8. $data = json_decode(file_get_contents('extend/wechat/jssdk/jsapi_ticket.php'));
  9. //print_r($data->expire_time);
  10. if (strpos($_SERVER['HTTP_USER_AGENT'], 'miniProgram') !== false) {
  11. $wx_xiao = true;
  12. $this->assign('wx_xiao', $wx_xiao);//网站配置
  13. }
  14. // $this->number();
  15. $column = Db::name('column')->where('isDisable', '<>', 1)->order('intOrder asc,id asc')->select();
  16. $column_list = Db::name('column')->where('isDisable', '<>', 1)->where('isHide', '<>', 1)->order('intOrder asc,id asc')->select();
  17. $all_categorys = array();
  18. if ($column) {
  19. foreach ($column as $key => $value) {

Call Stack

  1. in Base.php line 45
  2. at Error::appError(8, 'Undefined index: HTT...', '/data/work/html/zkgb...', 45, ['data' => null]) in Base.php line 45
  3. at Base->_initialize() in Index.php line 17
  4. at Index->_initialize() in Controller.php line 59
  5. at Controller->__construct(object(Request))
  6. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 359
  7. at App::invokeClass('app\officialweb\cont...') in Loader.php line 479
  8. at Loader::controller('Index', 'controller', false, 'Error') in App.php line 581
  9. at App::module(['officialweb', 'Index', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  10. at App::exec(['type' => 'module', 'module' => ['officialweb', 'Index', 'index'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  11. at App::run() in start.php line 19
  12. at require('/data/work/html/zkgb...') in index.php line 18

Environment Variables

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

Server/Request Data

HTTPS
on
SSL_TLS_SNI
www.zkgbsd.com
HTTP_HOST
www.zkgbsd.com
HTTP_ACCEPT
*/*
PATH
/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE
<address>Apache Server at www.zkgbsd.com Port 443</address>
SERVER_SOFTWARE
Apache
SERVER_NAME
www.zkgbsd.com
SERVER_ADDR
172.18.104.89
SERVER_PORT
443
REMOTE_ADDR
36.99.94.188
DOCUMENT_ROOT
/data/work/html/zkgbsdcom
SERVER_ADMIN
root@localhost
SCRIPT_FILENAME
/data/work/html/zkgbsdcom/index.php
REMOTE_PORT
33444
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1715170654.151
REQUEST_TIME
1715170654
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/data/work/html/zkgbsdcom/application/
THINK_VERSION
5.0.24
THINK_START_TIME
1715170654.1518
THINK_START_MEM
253648
EXT
.php
DS
/
THINK_PATH
/data/work/html/zkgbsdcom/thinkphp/
LIB_PATH
/data/work/html/zkgbsdcom/thinkphp/library/
CORE_PATH
/data/work/html/zkgbsdcom/thinkphp/library/think/
TRAIT_PATH
/data/work/html/zkgbsdcom/thinkphp/library/traits/
ROOT_PATH
/data/work/html/zkgbsdcom/
EXTEND_PATH
/data/work/html/zkgbsdcom/extend/
VENDOR_PATH
/data/work/html/zkgbsdcom/vendor/
RUNTIME_PATH
/data/work/html/zkgbsdcom/runtime/
LOG_PATH
/data/work/html/zkgbsdcom/runtime/log/
CACHE_PATH
/data/work/html/zkgbsdcom/runtime/cache/
TEMP_PATH
/data/work/html/zkgbsdcom/runtime/temp/
CONF_PATH
/data/work/html/zkgbsdcom/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false