[8] ErrorException in Index.php line 385

未定义数组索引: id

  1. $zxzx = Db::table('article')->where(['type'=>'装修攻略','is_show'=>'是'])->order('id desc')->limit(6)->select();
  2. $this->assign('zxzx', $zxzx);
  3. $sjs = Db::table('shejishi')->where(['show'=>'是'])->field('id,name,sjsname')->order('id asc')->limit(6)->select();
  4. $this->assign('sjs', $sjs);
  5. //浏览量+1
  6. Db::table('article')->where(['id'=>$id])->setInc('click',1);
  7. //上一篇
  8. $last = Db::table('article')->where(['id'=>['lt',$data['id']],'type'=>$data['type'],'is_show'=>'是'])->field('id,title')->order('id desc')->find();
  9. $this->assign('last', $last);
  10. //下一篇
  11. $next = Db::table('article')->where(['id'=>['gt',$data['id']],'type'=>$data['type'],'is_show'=>'是'])->field('id,title')->order('id')->find();
  12. $this->assign('next', $next);
  13. return $this->fetch('/article_news');
  14. }

Call Stack

  1. in Index.php line 385
  2. at Error::appError(8, 'Undefined index: id', '/www/wwwroot/www.zfz...', 385, ['id' => 82, 'data' => ['link' => ''], 'geturl' => null, ...]) in Index.php line 385
  3. at Index->article_news()
  4. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  5. at App::invokeMethod([object(Index), 'article_news'], []) in App.php line 611
  6. at App::module(['index', 'index', 'article_news'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'article_news'], '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.zfz...') in index.php line 17

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
PHP_APP_DEBUG
1
PHP_APP_TRACE
HTTP_REFERER
http://www.zfzsjt.cn/zifandongtai/82.html
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.zfzsjt.cn
PATH_INFO
/zifandongtai/82.html
REDIRECT_STATUS
200
SERVER_NAME
www.zfzsjt.cn
SERVER_PORT
443
SERVER_ADDR
172.24.174.188
REMOTE_PORT
47586
REMOTE_ADDR
3.229.122.112
SERVER_SOFTWARE
nginx/1.22.0
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/www/wwwroot/www.zfzsjt.cn/public
DOCUMENT_URI
/index.php
REQUEST_URI
/zifandongtai/82.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/zifandongtai/82.html
SCRIPT_FILENAME
/www/wwwroot/www.zfzsjt.cn/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1710831277.2841
REQUEST_TIME
1710831277
Environment Variables
empty

ThinkPHP Constants

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