[8] ErrorException in Index.php line 841

未定义数组下标: 0

  1. if($b==7){
  2. $c = substr($a,0,2);
  3. }
  4. if($b==8){
  5. $c = substr($a,0,3);
  6. }
  7. if($b==9){
  8. $c = substr($a,0,4);
  9. }
  10. $news=db('gonggao')->where('id',$cc[0])->select();
  11. foreach ($news as $key => $value) {
  12. $news[$key]['add_time']=substr($value['add_time'],0,10);
  13. }
  14. $news2=db('gonggao')->field('id,ca_id,titles,message,image,add_time')->order('add_time desc')->select();
  15. $this->assign('news',$news2);//总
  16. $this->assign('xiangqings',$news);
  17. // }
  18. }

Call Stack

  1. in Index.php line 841
  2. at Error::appError(8, 'Undefined offset: 0', '/www/wwwroot/jgkjcom...', 841, ['zixunName' => [['id' => 52, 'p_id' => 0, 'fl_name' => 'app开发', ...], ['id' => 54, 'p_id' => 0, 'fl_name' => '行业动态', ...], ['id' => 55, 'p_id' => 0, 'fl_name' => '公司动态', ...], ...], 'java' => [['id' => 288, 'titles' => '农场游戏开发', 'content' => '<p style="margin-top...', ...]], 'app' => [['id' => 24, 'titles' => '...', 'content' => '<p style="text-align...', ...], ['id' => 25, 'titles' => 'app软件趋势', 'content' => '...', ...], ['id' => 35, 'titles' => '...', 'content' => '...', ...], ...], ...]) in Index.php line 841
  3. at Index->newsdetails()
  4. at ReflectionMethod->invokeArgs(object(Index), []) in Container.php line 291
  5. at Container->invokeReflectMethod(object(Index), object(ReflectionMethod), []) in Module.php line 148
  6. at Module->run() in App.php line 378
  7. at App->think\{closure}(object(Request), object(Closure), null)
  8. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 119
  9. at Middleware->think\{closure}(object(Request))
  10. at call_user_func(object(Closure), object(Request)) in Middleware.php line 74
  11. at Middleware->dispatch(object(Request)) in App.php line 399
  12. at App->run() in index.php line 21

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST www.jugekeji.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO /newsdetails/active.html
REDIRECT_STATUS 200
SERVER_NAME www.jugekeji.com
SERVER_PORT 9000
SERVER_ADDR 127.0.0.1
REMOTE_PORT 36510
REMOTE_ADDR 127.0.0.1
SERVER_SOFTWARE nginx/1.22.1
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/jgkjcom/public
DOCUMENT_URI /index.php
REQUEST_URI /newsdetails/active.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/newsdetails/active.html
SCRIPT_FILENAME /www/wwwroot/jgkjcom/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711725269.8079
REQUEST_TIME 1711725269
Environment Variablesempty
ThinkPHP Constantsempty