[8] ErrorException in News.php line 123

未定义变量: last

  1. //判断下一篇id是否存在
  2. if(array_key_exists($k_next,$fy)){
  3. $next=$fy[$k+1]['article_id'];
  4. }else{
  5. $next=null;
  6. }
  7. }
  8. }
  9. //判断上下片是否存在,并获取展现的数据
  10. if($last==null&&$next==null){
  11. $arr['last']=null;
  12. $arr['next']=null;
  13. }else if($last==null&&$next!=null){
  14. $arr['last']=null;
  15. $arr['next']=Db('news')->alias('a')->where(['a.article_id'=>$next])->field('a.article_id,a.title')->find();
  16. }else if($last!=null&&$next==null){
  17. $arr['last']=Db('news')->alias('a')->where(['a.article_id'=>$last])->field('a.article_id,a.title')->find();
  18. $arr['next']=null;
  19. }else{

Call Stack

  1. in News.php line 123
  2. at Error::appError(8, 'Undefined variable: ...', '/usr/home/wh-aqeh0nt...', 123, ['article_id' => '81', 'fy' => [['article_id' => 75], ['article_id' => 78], ['article_id' => 76], ...], 'v' => ['article_id' => 80], ...]) in News.php line 123
  3. at News->fy('81') in News.php line 92
  4. at News->news_show()
  5. at ReflectionMethod->invokeArgs(object(News), []) in Container.php line 395
  6. at Container->invokeReflectMethod(object(News), object(ReflectionMethod), ['article_id' => '81']) in Module.php line 132
  7. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  8. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  9. at Middleware->think\{closure}(object(Request))
  10. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  11. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  12. at Module->exec() in Dispatch.php line 168
  13. at Dispatch->run() in App.php line 432
  14. at App->think\{closure}(object(Request), object(Closure), null)
  15. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  16. at Middleware->think\{closure}(object(Request))
  17. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  18. at Middleware->dispatch(object(Request)) in App.php line 435
  19. at App->run() in index.php line 21

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
DOCUMENT_ROOT /usr/home/wh-aqeh0ntn6xiwf8r9pe5/htdocs
GATEWAY_INTERFACE CGI/1.1
HTTPS on
HTTP_ACCEPT */*
HTTP_HOST nbjxsc.com
HTTP_USER_AGENT claudebot
PATH /bin
PHPRC /var/www/php70/hichina_ini/wh-aqeh0ntn6xiwf8r9pe5
QUERY_STRING
REDIRECT_DOCUMENT_ROOT /usr/home/wh-aqeh0ntn6xiwf8r9pe5/htdocs
REDIRECT_GATEWAY_INTERFACE CGI/1.1
REDIRECT_HTTPS on
REDIRECT_HTTP_ACCEPT */*
REDIRECT_HTTP_HOST nbjxsc.com
REDIRECT_HTTP_USER_AGENT claudebot
REDIRECT_PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REDIRECT_PATH_INFO /news/news_show/article_id/81.html
REDIRECT_PATH_TRANSLATED redirect:/index.php/news/news_show/article_id/81.html/news_show/article_id/81.html
REDIRECT_QUERY_STRING
REDIRECT_REMOTE_ADDR 3.87.209.162
REDIRECT_REMOTE_PORT 59252
REDIRECT_REQUEST_METHOD GET
REDIRECT_REQUEST_URI /index/news/news_show/article_id/81.html
REDIRECT_SCRIPT_FILENAME /usr/home/wh-aqeh0ntn6xiwf8r9pe5/htdocs/index
REDIRECT_SCRIPT_NAME /index
REDIRECT_SERVER_ADDR 10.17.21.49
REDIRECT_SERVER_ADMIN webmaster@wh-aqeh0ntn6xiwf8r9pe5.my3w.com
REDIRECT_SERVER_NAME nbjxsc.com
REDIRECT_SERVER_PORT 443
REDIRECT_SERVER_PROTOCOL HTTP/1.1
REDIRECT_SERVER_SIGNATURE
REDIRECT_SERVER_SOFTWARE Apache
REDIRECT_SSL_TLS_SNI nbjxsc.com
REDIRECT_STATUS 200
REDIRECT_TZ Asia/Shanghai
REDIRECT_UNIQUE_ID ZgXdTgoRFTEABcgR1ScAAAAO
REDIRECT_URL /index/news/news_show/article_id/81.html
REMOTE_ADDR 3.87.209.162
REMOTE_PORT 59252
REQUEST_METHOD GET
REQUEST_URI /index/news/news_show/article_id/81.html
SCRIPT_FILENAME /usr/home/wh-aqeh0ntn6xiwf8r9pe5/htdocs/index.php
SCRIPT_NAME /index.php
SERVER_ADDR 10.17.21.49
SERVER_ADMIN webmaster@wh-aqeh0ntn6xiwf8r9pe5.my3w.com
SERVER_NAME nbjxsc.com
SERVER_PORT 443
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SSL_TLS_SNI nbjxsc.com
TZ Asia/Shanghai
UNIQUE_ID ZgXdTgoRFTEABcgR1ScAAAAO
ORIG_PATH_INFO /index/news/news_show/article_id/81.html
ORIG_PATH_TRANSLATED /usr/home/wh-aqeh0ntn6xiwf8r9pe5/htdocs/index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711660366.3577
REQUEST_TIME 1711660366
Environment Variablesempty
ThinkPHP Constantsempty