[8] ErrorException in Show.php line 30

未定义数组索引: cid

  1. if (!($id > 0)) {
  2. $id = $arr[count($arr)-1];
  3. }
  4. $content_model = Loader::model('Content');
  5. $category_model = Loader::model('Category');
  6. $contents = $content_model->getContentById($id); // 内容详情
  7. $categorys = $category_model->getOnecategory($contents['cid']); // 内容所在分类
  8. $top = $category_model->getTopCategory($categorys['id']); // 内容顶级分类
  9. if (!$categorys['tpl_detail']) {
  10. $this->error('模板未选择');
  11. }
  12. $this->assign('content_id', $id);
  13. $this->assign('category_id', $categorys['id']);
  14. $this->assign('top_id', $top['id']);

Call Stack

  1. in Show.php line 30
  2. at Error::appError(8, 'Undefined index: cid', '/www/wwwroot/www.hfj...', 30, ['id' => 'index.html', 'ids' => 's=/show/id/index.htm...', 'arr' => ['s=', 'show', 'id', ...], ...]) in Show.php line 30
  3. at Show->index('')
  4. at ReflectionMethod->invokeArgs(object(Show), ['']) in App.php line 343
  5. at App::invokeMethod([object(Show), 'index'], []) in App.php line 611
  6. at App::module(['index', 'Show', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  7. at App::exec(['type' => 'module', 'module' => ['index', 'Show', 'index'], 'convert' => false], ['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/www.hfj...') in index.php line 27

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/www.hfjiguang.com/index.php
QUERY_STRING
s=/show/id/index.html
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/show/id/index.html
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/www/wwwroot/www.hfjiguang.com
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
http
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.22.1
REMOTE_ADDR
34.205.246.61
REMOTE_PORT
37524
SERVER_ADDR
192.168.0.173
SERVER_PORT
80
SERVER_NAME
www.hfjiguang.com
REDIRECT_STATUS
200
PATH_INFO
/show/id/index.html
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
www.hfjiguang.com
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711631397.1291
REQUEST_TIME
1711631397
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.hfjiguang.com/app/
WEB_PATH
/www/wwwroot/www.hfjiguang.com/template/default
THINK_VERSION
5.0.24
THINK_START_TIME
1711631397.1295
THINK_START_MEM
264336
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.hfjiguang.com/core/
LIB_PATH
/www/wwwroot/www.hfjiguang.com/core/library/
CORE_PATH
/www/wwwroot/www.hfjiguang.com/core/library/think/
TRAIT_PATH
/www/wwwroot/www.hfjiguang.com/core/library/traits/
ROOT_PATH
/www/wwwroot/www.hfjiguang.com/
EXTEND_PATH
/www/wwwroot/www.hfjiguang.com/extend/
VENDOR_PATH
/www/wwwroot/www.hfjiguang.com/addons/
RUNTIME_PATH
/www/wwwroot/www.hfjiguang.com/caches/
LOG_PATH
/www/wwwroot/www.hfjiguang.com/caches/log/
CACHE_PATH
/www/wwwroot/www.hfjiguang.com/caches/cache/
TEMP_PATH
/www/wwwroot/www.hfjiguang.com/caches/temp/
CONF_PATH
/www/wwwroot/www.hfjiguang.com/config/
CONF_EXT
.php
ENV_PREFIX
PHP_
SITE_BACK_PATH
/www/wwwroot/www.hfjiguang.com/data/sitedata/
DB_BACK_PATH
/www/wwwroot/www.hfjiguang.com/data/backdata/
IS_CLI
false
IS_WIN
false
OK
操作成功
FAIL
系统繁忙