[8] ErrorException in ArticleController.php line 53

未定义变量: next_id

  1. }
  2. //获取上一篇
  3. if(isset($all_id[$key-1])){
  4. $pre_id = $all_id[$key-1]['id'];
  5. }else{
  6. $pre_id = '';
  7. }
  8. }
  9. }
  10. if($next_id != ''){
  11. $next_info = Db::name("articles")->field('id,title')->where("id",$next_id)->find();
  12. }else{
  13. $next_info = '';
  14. }
  15. if($pre_id != ''){
  16. $pre_info = Db::name("articles")->field('id,title')->where("id",$pre_id)->find();
  17. }else{
  18. $pre_info = '';
  19. }

Call Stack

  1. in ArticleController.php line 53
  2. at Error::appError(8, 'Undefined variable: ...', '/www/wwwroot/sxsdfxb...', 53, ['id' => '243', 'pc_ad4' => ['id' => 47, 'title' => 'PC内页侧边小广...', 'content' => '<p><img src="/public...', ...], 'pc_ad5' => ['id' => 48, 'title' => 'PC内页侧边小广...', 'content' => '<p><img src="/public...', ...], ...]) in ArticleController.php line 53
  3. at ArticleController->show('243')
  4. at ReflectionMethod->invokeArgs(object(ArticleController), ['243']) in App.php line 343
  5. at App::invokeMethod([object(ArticleController), 'show'], []) in App.php line 606
  6. at App::module(['home', 'article', 'show'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  7. at App::exec(['type' => 'module', 'module' => ['home', 'article', 'show'], '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/sxsdfxb...') in index.php line 18

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/sxsdfxb.cn/index.php
QUERY_STRING
s=/article/show/id/243.html
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/article/show/id/243.html
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/www/wwwroot/sxsdfxb.cn
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
http
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.18.0
REMOTE_ADDR
18.207.104.87
REMOTE_PORT
36748
SERVER_ADDR
172.31.50.168
SERVER_PORT
80
SERVER_NAME
sxsdfxb.cn
REDIRECT_STATUS
200
PATH_INFO
/article/show/id/243.html
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
sxsdfxb.cn
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711696037.0182
REQUEST_TIME
1711696037
Environment Variables
empty

ThinkPHP Constants

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