[8] ErrorException in Teacher.php line 195

未定义数组索引: id

  1. // 详情
  2. if (!empty($param)) {
  3. $id = $param[0];
  4. $info = Db::name('CmsWebTeacher')
  5. ->where(['is_deleted' => 0, 'status' => 1])
  6. ->where('id', $id)
  7. ->find();
  8. $info['title'] = $info['name'];
  9. Db::name('CmsWebTeacher')
  10. ->where('id', $info['id'])
  11. ->setInc('views');
  12. // 模板
  13. $temp = 'detail_log';
  14. // 网站详情页SEO优化
  15. $this->title = empty($info['web_title']) ? $info['title'] : $info['web_title'];
  16. $this->keywords = $info['web_keywords'];
  17. $this->description = $info['web_description'];
  18. // 详情
  19. $this->detail = $info;

Call Stack

  1. in Teacher.php line 195
  2. at Error::appError(8, 'Undefined index: id', '/test/www/longxing/a...', 195, ['param' => ['12'], 'temp' => 'logistics', 'id' => '12', ...]) in Teacher.php line 195
  3. at Teacher->logistics()
  4. at ReflectionMethod->invokeArgs(object(Teacher), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(Teacher), object(ReflectionMethod), ['12', 'convert' => false]) 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)) in sys.php line 145
  16. at {closure}(object(Request), object(Closure), null)
  17. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  18. at Middleware->think\{closure}(object(Request)) in common.php line 247
  19. at {closure}(object(Request), object(Closure), null)
  20. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  21. at Middleware->think\{closure}(object(Request))
  22. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  23. at Middleware->dispatch(object(Request)) in App.php line 435
  24. at App->run() in index.php line 20

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST www.longxingart.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME longxingart.com
SERVER_PORT 80
SERVER_ADDR 172.16.142.241
REMOTE_PORT 54662
REMOTE_ADDR 54.163.200.109
SERVER_SOFTWARE nginx/1.20.2
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /test/www/longxing/public
DOCUMENT_URI /index.php
REQUEST_URI /teacher_logistics_12.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/teacher_logistics_12.html
SCRIPT_FILENAME /test/www/longxing/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711663420.8283
REQUEST_TIME 1711663420
Environment Variablesempty
ThinkPHP Constants
QINIU_FUNCTIONS_VERSION 7.2.10