[8] ErrorException in Artcile.php line 91

未定义数组下标: 0

  1. $article = db('article')->where('cid',$id)->order('create_time desc')->find();}
  2. if($pid==0){
  3. $article = db('article')->where('cid',$category1[0]['id'])->order('create_time desc')->find();}
  4. if(!empty($article['photo_code']))
  5. $article['photo_code'] = json_decode($article['photo_code'],true);
  6. $this->assign('article', $article);
  7. return $this->fetch('artcile1');
  8. }
  9. if($pid==0)
  10. $id = $category1[0]['id'];
  11. $list = model('article')->with('category')->order('create_time desc')->where(['cid'=>$id,'status'=>1])
  12. ->paginate(config('page_number'), false);
  13. $this->assign('article', $list);
  14. if($category['category']==2)
  15. return $this->fetch('artcile2');
  16. else
  17. return $this->fetch('artcile3');
  18. }

Call Stack

  1. in Artcile.php line 91
  2. at Error::appError(8, 'Undefined offset: 0', '/www/wwwroot/jxyuzha...', 91, ['id' => '82', 'pid' => 'index.php', 'category' => ['id' => 82, 'pid' => 78, 'category_name' => '...', ...], ...]) in Artcile.php line 91
  3. at Artcile->index()
  4. at ReflectionMethod->invokeArgs(object(Artcile), []) in App.php line 343
  5. at App::invokeMethod([object(Artcile), 'index'], []) in App.php line 611
  6. at App::module(['index', 'artcile', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['index', 'artcile', 'index']], ['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/jxyuzha...') in index.php line 16

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
www.jxyuzhang.com
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
/index/artcile/index/id/82/pid/index.php
REDIRECT_STATUS
200
SERVER_NAME
jxyuzhang.com
SERVER_PORT
80
SERVER_ADDR
172.16.66.19
REMOTE_PORT
45374
REMOTE_ADDR
18.208.203.36
SERVER_SOFTWARE
nginx/1.22.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/jxyuzhang.com
DOCUMENT_URI
/index.php/index/artcile/index/id/82/pid/index.php
REQUEST_URI
/index.php/index/artcile/index/id/82/pid/index.php
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/www/wwwroot/jxyuzhang.com/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php/index/artcile/index/id/82/pid/index.php
REQUEST_TIME_FLOAT
1710817918.7709
REQUEST_TIME
1710817918
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/jxyuzhang.com/application/
THINK_VERSION
5.0.24
THINK_START_TIME
1710817918.7711
THINK_START_MEM
356048
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/jxyuzhang.com/thinkphp/
LIB_PATH
/www/wwwroot/jxyuzhang.com/thinkphp/library/
CORE_PATH
/www/wwwroot/jxyuzhang.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/jxyuzhang.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/jxyuzhang.com/
EXTEND_PATH
/www/wwwroot/jxyuzhang.com/extend/
VENDOR_PATH
/www/wwwroot/jxyuzhang.com/vendor/
RUNTIME_PATH
/www/wwwroot/jxyuzhang.com/runtime/
LOG_PATH
/www/wwwroot/jxyuzhang.com/runtime/log/
CACHE_PATH
/www/wwwroot/jxyuzhang.com/runtime/cache/
TEMP_PATH
/www/wwwroot/jxyuzhang.com/runtime/temp/
CONF_PATH
/www/wwwroot/jxyuzhang.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false