[8] ErrorException in Index.php line 60

未定义数组索引: nowid

  1. public function index()
  2. {
  3. //halt('ewwewe');
  4. if(isset($GLOBALS['newact'])){
  5. $recommendList = $this->news->order('id desc')->limit(5)->select();
  6. $this->view->assign('recommendList', $recommendList);
  7. if (in_array($GLOBALS['newact'], ['about', 'about1','about2','about4'])) {
  8. $topCateModel = get_top_cate($this->category, $GLOBALS['nowid']);
  9. $this->view->assign('topCateModel', $topCateModel);
  10. $ids = get_delete_ids_static($this->category, 'pid', $topCateModel->id);
  11. $categoryList = $this->category->where('id', 'in', $ids)->select();
  12. $categoryArr = digui($categoryList, 'pid', 'id', $topCateModel->id);
  13. $this->view->assign('categoryArr', $categoryArr);
  14. $lineCate = get_cate_line_ids($this->category, $GLOBALS['nowid']);
  15. $this->view->assign('lineCateIds', $lineCate);
  16. $needCategoryArr = array();

Call Stack

  1. in Index.php line 60
  2. at Error::appError(8, 'Undefined index: now...', '/www/wwwroot/shcyy.t...', 60, ['recommendList' => [object(News), object(News), object(News), ...]]) in Index.php line 60
  3. at Index->index()
  4. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  5. at App::invokeMethod([object(Index), 'index'], []) in App.php line 611
  6. at App::module(['', null, null], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['', null, null]], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  8. at App::run() in start.php line 19
  9. at require('/www/wwwroot/shcyy.t...') in show.php line 27

Environment Variables

GET Data

id
162
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
www.sicpc.org.cn
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
REDIRECT_STATUS
200
SERVER_NAME
sicpc.cn
SERVER_PORT
80
SERVER_ADDR
172.16.145.207
REMOTE_PORT
52430
REMOTE_ADDR
18.207.240.205
SERVER_SOFTWARE
nginx/1.16.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/shcyy.tianrencn.com/public
DOCUMENT_URI
/about1/show.php
REQUEST_URI
/about1/show.php?id=162
SCRIPT_NAME
/about1/show.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
id=162
SCRIPT_FILENAME
/www/wwwroot/shcyy.tianrencn.com/public/about1/show.php
FCGI_ROLE
RESPONDER
PHP_SELF
/about1/show.php
REQUEST_TIME_FLOAT
1711616209.9504
REQUEST_TIME
1711616209
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/shcyy.tianrencn.com/public/about1/../../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711616209.9509
THINK_START_MEM
411144
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/shcyy.tianrencn.com/thinkphp/
LIB_PATH
/www/wwwroot/shcyy.tianrencn.com/thinkphp/library/
CORE_PATH
/www/wwwroot/shcyy.tianrencn.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/shcyy.tianrencn.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/shcyy.tianrencn.com/
EXTEND_PATH
/www/wwwroot/shcyy.tianrencn.com/extend/
VENDOR_PATH
/www/wwwroot/shcyy.tianrencn.com/vendor/
RUNTIME_PATH
/www/wwwroot/shcyy.tianrencn.com/runtime/
LOG_PATH
/www/wwwroot/shcyy.tianrencn.com/runtime/log/
CACHE_PATH
/www/wwwroot/shcyy.tianrencn.com/runtime/cache/
TEMP_PATH
/www/wwwroot/shcyy.tianrencn.com/runtime/temp/
CONF_PATH
/www/wwwroot/shcyy.tianrencn.com/public/about1/../../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
ADDON_PATH
/www/wwwroot/shcyy.tianrencn.com/addons/