[8] ErrorException in Article.php line 116

未定义数组下标: 2

  1. $arr = explode("/",$url);
  2. $strarr = explode(".",$arr[2]);
  3. $id = $strarr[0];
  4. return $this->types($id);
  5. }
  6. public function tag()
  7. {
  8. $url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
  9. $arr = explode("/",$url);
  10. $strarr = explode(".",$arr[2]);
  11. $id = $strarr[0];
  12. return $this->tags($id);
  13. }
  14. public function index($cid)
  15. {
  16. //$cid = input('cid');
  17. $cate_info = model('admin/article/Category')->find($cid);
  18. if(!$cid || !$cate_info)

Call Stack

  1. in Article.php line 116
  2. at Error::appError(8, 'Undefined offset: 2', '/data/user/htdocs/ap...', 116, ['url' => 'www.netconst.cn/tag?...', 'arr' => ['www.netconst.cn', 'tag?p=36']]) in Article.php line 116
  3. at Article->tag()
  4. at ReflectionMethod->invokeArgs(object(Article), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(Article), object(ReflectionMethod), ['p' => '36', 'convert' => false]) in Module.php line 132
  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 137
  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 21

Environment Variables

GET Data
p 36
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER nobody
HOME /
HTTP_HOST www.netconst.cn
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
REDIRECT_STATUS 200
SERVER_NAME wh-nac6uejjkugpu9pq10l.my3w.com
SERVER_PORT 80
SERVER_ADDR 10.29.64.153
REMOTE_PORT 36460
REMOTE_ADDR 3.235.22.225
SERVER_SOFTWARE nginx/1.18.0
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /data/user/htdocs
DOCUMENT_URI /index.php//tag
REQUEST_URI /tag?p=36
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING p=36
PATH_INFO //tag
SCRIPT_FILENAME /data/user/htdocs/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php//tag
REQUEST_TIME_FLOAT 1711727482.9722
REQUEST_TIME 1711727482
Environment Variablesempty
ThinkPHP Constantsempty