[8] ErrorException in Kernel.php line 96

未定义变量: count

  1. //查询当前信息在所有信息里的索引
  2. foreach ($all as $key => $val){
  3. if($id == $val['id']){
  4. $count = $key;
  5. }
  6. }
  7. $flag = 0;
  8. $flag1 = 0;
  9. if(isset($all[$count-1])){
  10. $flag = 1;
  11. }
  12. if(isset($all[$count+1])){
  13. $flag1 = 1;
  14. }
  15. //导航
  16. $counts = 2;

Call Stack

  1. in Kernel.php line 96
  2. at Error::appError(8, 'Undefined variable: ...', '/www/wwwroot/hbbsjn....', 96, ['id' => '143', 'res' => null, 'all' => [['id' => 381, 'title' => '...'], ['id' => 303, 'title' => '...'], ['id' => 163, 'title' => '高新技术企业'], ...], ...]) in Kernel.php line 96
  3. at Kernel->kernel_detail('143')
  4. at ReflectionMethod->invokeArgs(object(Kernel), ['143']) in Container.php line 395
  5. at Container->invokeReflectMethod(object(Kernel), object(ReflectionMethod), ['id' => '143']) in Module.php line 131
  6. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  7. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  8. at Middleware->think\{closure}(object(Request))
  9. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  10. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  11. at Module->exec() in Dispatch.php line 168
  12. at Dispatch->run() in App.php line 432
  13. at App->think\{closure}(object(Request), object(Closure), null)
  14. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  15. at Middleware->think\{closure}(object(Request))
  16. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  17. at Middleware->dispatch(object(Request)) in App.php line 435
  18. at App->run() in index.php line 24

Environment Variables

GET Data
id 143
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST hbbsjn.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME hbbsjn.com
SERVER_PORT 80
SERVER_ADDR 192.168.2.158
REMOTE_PORT 42702
REMOTE_ADDR 44.214.106.184
SERVER_SOFTWARE nginx/1.22.1
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/hbbsjn.com
DOCUMENT_URI /index.php
REQUEST_URI /home/kernel/kernel_detail.html?id=143
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/home/kernel/kernel_detail.html&id=143
SCRIPT_FILENAME /www/wwwroot/hbbsjn.com/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711715119.7091
REQUEST_TIME 1711715119
Environment Variablesempty
ThinkPHP Constants
__PHYSICS__ /www/wwwroot