[8] ErrorException in Index.php line 155

未定义变量: last

  1. $news_tj=Db::name('article')->where('status',1)->order('inputtime desc')->limit(8)->select();
  2. $news_new=Db::name('article')->order('inputtime desc')->limit(8)->select();
  3. $arr=explode(',',$news['xgword']);
  4. if(count($arr)>1){
  5. $news_kw=Db::name('article')->where('xgword','like',"%".$arr[0]."%")->whereOr('xgword','like',"%".$arr[1]."%")->order('inputtime desc')->limit(8)->select();
  6. }else{
  7. $news_kw=Db::name('article')->where('xgword',$arr[0])->order('inputtime desc')->limit(8)->select();
  8. }
  9. $this->assign('news',$news);
  10. $this->assign('last',$last);
  11. $this->assign('next',$next);
  12. $this->assign('news_tj',$news_tj);
  13. $this->assign('news_new',$news_new);
  14. $this->assign('news_kw',$news_kw);
  15. $this->footer();
  16. return view();
  17. }
  18. }

Call Stack

  1. in Index.php line 155
  2. at Error::appError(8, 'Undefined variable: ...', '/www/wwwroot/dhxuech...', 155, ['id' => '161', 'a' => ['161', 'html'], 'news' => null, ...]) in Index.php line 155
  3. at Index->news_detail('161')
  4. at ReflectionMethod->invokeArgs(object(Index), ['161.html']) in App.php line 343
  5. at App::invokeMethod([object(Index), 'news_detail'], []) in App.php line 611
  6. at App::module(['index', 'index', 'news_detail'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'news_detail'], '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/dhxuech...') in index.php line 24

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.dhxueche.com
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
/news/161.html
REDIRECT_STATUS
200
SERVER_NAME
www.dhxueche.com
SERVER_PORT
80
SERVER_ADDR
192.168.0.90
REMOTE_PORT
38162
REMOTE_ADDR
54.227.104.229
SERVER_SOFTWARE
nginx/1.24.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/dhxueche.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/news/161.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/news/161.html
SCRIPT_FILENAME
/www/wwwroot/dhxueche.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711614928.155
REQUEST_TIME
1711614928
Environment Variables
empty

ThinkPHP Constants

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