[8] ErrorException in common.php line 387

未定义数组索引: pid

  1. /**
  2. * 获取当前位置
  3. */
  4. function get_position($content)
  5. {
  6. // $data=$_SERVER['Home'];
  7. //
  8. $module =ucfirst(app('request')->module());
  9. $parent= model('category')->where(['id'=>$content['pid']])->find();
  10. $res= model('category')->where(['id'=>$content['pid']])->find();
  11. while ($res['pid']!=0)
  12. {
  13. $res=model('category')->where(['id'=>$res['pid']])->find();
  14. }
  15. if ($module == "Mobile"){
  16. $parent['url']='/'.$module.url('/Lists/index',array('cid'=>$parent['id']));
  17. }else{
  18. $parent['url']='/'.$res['ename'].'/'.$parent['id'].'.html';

Call Stack

  1. in common.php line 387
  2. at Error::appError(8, 'Undefined index: pid', '/home/gusucomcnhgjue...', 387, ['content' => ['url' => '/Index/Lists/index.h...'], 'module' => 'Index']) in common.php line 387
  3. at get_position(['url' => '/Index/Lists/index.h...']) in 1434604e02919182d0bddc23da799378.php line 78
  4. at include('/home/gusucomcnhgjue...') in File.php line 59
  5. at File->read('/home/gusucomcnhgjue...', ['thisModule' => 'index', 'thisController' => 'Lists', 'thisClass' => 'index/lists', ...]) in Template.php line 226
  6. at Template->fetch('./template/index/lis...', ['thisModule' => 'index', 'thisController' => 'Lists', 'thisClass' => 'index/lists', ...], []) in Think.php line 93
  7. at Think->fetch('./template/index/lis...', ['thisModule' => 'index', 'thisController' => 'Lists', 'thisClass' => 'index/lists', ...], []) in View.php line 189
  8. at View->fetch('lists_news', ['thisModule' => 'index', 'thisController' => 'Lists', 'thisClass' => 'index/lists', ...], []) in Controller.php line 161
  9. at Controller->fetch('lists_news') in Lists.php line 43
  10. at Lists->index()
  11. at ReflectionMethod->invokeArgs(object(Lists), []) in Container.php line 395
  12. at Container->invokeReflectMethod(object(Lists), object(ReflectionMethod), ['cid' => '23', 'convert' => false]) in Module.php line 132
  13. at Module->think\route\dispatch\{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), 'controller') in Module.php line 137
  18. at Module->exec() in Dispatch.php line 168
  19. at Dispatch->run() in App.php line 432
  20. at App->think\{closure}(object(Request), object(Closure), null)
  21. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  22. at Middleware->think\{closure}(object(Request))
  23. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  24. at Middleware->dispatch(object(Request)) in App.php line 435
  25. at App->run() in index.php line 12

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
REDIRECT_REDIRECT_UNIQUE_ID ZgYCffGNjt2BOPTQqo-OFgAAAAI
REDIRECT_REDIRECT_PHPRC /home/gusucomcnhgjues4ufccoum3cjn/others
REDIRECT_REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID ZgYCffGNjt2BOPTQqo-OFgAAAAI
REDIRECT_PHPRC /home/gusucomcnhgjues4ufccoum3cjn/others
REDIRECT_HANDLER php-cgi
REDIRECT_STATUS 200
UNIQUE_ID ZgYCffGNjt2BOPTQqo-OFgAAAAI
PHPRC /home/gusucomcnhgjues4ufccoum3cjn/others
HTTP_X_FORWARDED_FOR 34.201.122.150
HTTP_X_REAL_IP 34.201.122.150
HTTP_HOST gusu.com.cn
HTTP_CONNECTION close
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
PATH /sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE <address>Apache Server at gusu.com.cn Port 80</address>
SERVER_SOFTWARE Apache
SERVER_NAME gusu.com.cn
SERVER_ADDR 127.0.0.1
SERVER_PORT 80
REMOTE_ADDR 34.201.122.150
DOCUMENT_ROOT /home/gusucomcnhgjues4ufccoum3cjn/wwwroot
REQUEST_SCHEME http
CONTEXT_PREFIX /php-run-as-cgi
CONTEXT_DOCUMENT_ROOT /usr/php7.0/bin
SERVER_ADMIN webmaster@gusucomcn
SCRIPT_FILENAME /home/gusucomcnhgjues4ufccoum3cjn/wwwroot/index.php
REMOTE_PORT 35970
REDIRECT_URL /index.php
REDIRECT_QUERY_STRING s=xinwenzhongxin/23.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING s=xinwenzhongxin/23.html
REQUEST_URI /xinwenzhongxin/23.html
SCRIPT_NAME /index.php
ORIG_SCRIPT_FILENAME /usr/php7.0/bin/php-cgi
ORIG_PATH_INFO /index.php
ORIG_PATH_TRANSLATED /home/gusucomcnhgjues4ufccoum3cjn/wwwroot/index.php
ORIG_SCRIPT_NAME /php-run-as-cgi/php-cgi
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711669885.7853
REQUEST_TIME 1711669885
Environment Variablesempty
ThinkPHP Constants
APP_PATH /home/gusucomcnhgjues4ufccoum3cjn/wwwroot/application/
APP_DEBUG 1