[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/hengze2uh7e4ni...', 387, ['content' => ['url' => '/Index/Lists/index.h...'], 'module' => 'Index']) in common.php line 387
  3. at get_position(['url' => '/Index/Lists/index.h...']) in 8be644aaf01f14f525e1fd50cd31edc1.php line 79
  4. at include('/home/hengze2uh7e4ni...') in File.php line 59
  5. at File->read('/home/hengze2uh7e4ni...', ['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_contact', ['thisModule' => 'index', 'thisController' => 'Lists', 'thisClass' => 'index/lists', ...], []) in Controller.php line 161
  9. at Controller->fetch('lists_contact') 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' => '82', '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 11

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
REDIRECT_REDIRECT_UNIQUE_ID ZgVrOal3jtpVwnGdf-Of1gAAAAU
REDIRECT_REDIRECT_PHPRC /home/hengze2uh7e4nigizhet2/others
REDIRECT_REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID ZgVrOal3jtpVwnGdf-Of1gAAAAU
REDIRECT_PHPRC /home/hengze2uh7e4nigizhet2/others
REDIRECT_HANDLER php-cgi
REDIRECT_STATUS 200
UNIQUE_ID ZgVrOal3jtpVwnGdf-Of1gAAAAU
PHPRC /home/hengze2uh7e4nigizhet2/others
HTTP_X_FORWARDED_FOR 44.193.80.126
HTTP_X_REAL_IP 44.193.80.126
HTTP_HOST www.sulawyer.cn
HTTP_CONNECTION close
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
PATH /sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE <address>Apache Server at www.sulawyer.cn Port 80</address>
SERVER_SOFTWARE Apache
SERVER_NAME www.sulawyer.cn
SERVER_ADDR 127.0.0.1
SERVER_PORT 80
REMOTE_ADDR 44.193.80.126
DOCUMENT_ROOT /home/hengze2uh7e4nigizhet2/wwwroot
REQUEST_SCHEME http
CONTEXT_PREFIX /php-run-as-cgi
CONTEXT_DOCUMENT_ROOT /usr/php7.1/bin
SERVER_ADMIN webmaster@hengze2
SCRIPT_FILENAME /home/hengze2uh7e4nigizhet2/wwwroot/index.php
REMOTE_PORT 44264
REDIRECT_URL /index.php
REDIRECT_QUERY_STRING s=lianxiwomen/82.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING s=lianxiwomen/82.html
REQUEST_URI /lianxiwomen/82.html
SCRIPT_NAME /index.php
ORIG_SCRIPT_FILENAME /usr/php7.1/bin/php-cgi
ORIG_PATH_INFO /index.php
ORIG_PATH_TRANSLATED /home/hengze2uh7e4nigizhet2/wwwroot/index.php
ORIG_SCRIPT_NAME /php-run-as-cgi/php-cgi
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711631161.2721
REQUEST_TIME 1711631161
Environment Variablesempty
ThinkPHP Constants
APP_PATH /home/hengze2uh7e4nigizhet2/wwwroot/application/