beat365官方网站 - 首页入口 - beat365官方网站入口首页

#0 [2]ErrorException in Article.php line 199

Invalid argument supplied for foreach()

  1. if(!$contentTemplateInfo['table_name']){
  2. return $this->fetch("error_page");
  3. exit;
  4. }
  5. //获得当前图文信息
  6. $article = Db::name($contentTemplateInfo['table_name'])->where('id',$id)->find();
  7. foreach ($article AS $k => $v){
  8. if (!empty($v) && strpos($v, "|") !== false) {
  9. //处理字段内是否有“|”符号,如果有则拆分成数组
  10. $article[$k] = explode("|", $v);
  11. }
  12. }
  13. $this->assign('article',$article);
  14. $prefix = config("database.connections.mysql.prefix"); //数据表前缀
  15. //浏览次数+1

Call Stack

  1. in Article.php line 199
  2. at Error->appError(2, 'Invalid argument sup...', '/www/users/HA688563/...', 199, ['id' => 'site-product-15', 'catId' => '15', 'articleCate' => ['id' => 15, 'parent_id' => 5, 'title' => '企业新闻', ...], ...]) in Article.php line 199
  3. at Article->show()
  4. at ReflectionMethod->invokeArgs(object(Article), []) in Container.php line 344
  5. at Container->invokeReflectMethod(object(Article), object(ReflectionMethod), ['cat_id' => '15', 'id' => 'site-product-15']) in Controller.php line 110
  6. at Controller->think\route\dispatch\{closure}(object(Request)) in Pipeline.php line 59
  7. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  8. at Pipeline->then(object(Closure)) in Controller.php line 113
  9. at Controller->exec() in Dispatch.php line 90
  10. at Dispatch->run() in Route.php line 772
  11. at Route->think\{closure}(object(Request)) in Pipeline.php line 59
  12. at Pipeline->think\{closure}(object(Request)) in Library.php line 139
  13. at Library->think\admin\{closure}(object(Request), object(Closure))
  14. at call_user_func(object(Closure), object(Request), object(Closure)) in Middleware.php line 142
  15. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  16. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  17. at Pipeline->then(object(Closure)) in Route.php line 773
  18. at Route->dispatch(object(Request), object(Closure)) in Http.php line 216
  19. at Http->dispatchToRoute(object(Request)) in Http.php line 206
  20. at Http->think\{closure}(object(Request)) in Pipeline.php line 59
  21. at Pipeline->think\{closure}(object(Request)) in Multiple.php line 72
  22. at Multiple->think\admin\multiple\{closure}(object(Request)) in Pipeline.php line 59
  23. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  24. at Pipeline->then(object(Closure)) in Multiple.php line 73
  25. at Multiple->handle(object(Request), object(Closure))
  26. at call_user_func([object(Multiple), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  27. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  28. at Pipeline->think\{closure}(object(Request)) in LoadLangPack.php line 57
  29. at LoadLangPack->handle(object(Request), object(Closure))
  30. at call_user_func([object(LoadLangPack), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  31. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  32. at Pipeline->think\{closure}(object(Request)) in SessionInit.php line 67
  33. at SessionInit->handle(object(Request), object(Closure))
  34. at call_user_func([object(SessionInit), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  35. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  36. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  37. at Pipeline->then(object(Closure)) in Http.php line 207
  38. at Http->runWithRequest(object(Request)) in Http.php line 170
  39. at Http->run() in SystemService.php line 484
  40. at SystemService->doInit() in index.php line 10

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookies
ssid 8a91b3c3b8c15f7c8cbd62a38268c5e7
lang zh-cn
Session
lang cn
Server/Request Data
REDIRECT_REDIRECT_UNIQUE_ID Y4-jcn8AAAEAAEa8eVgAAAAG
REDIRECT_REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID Y4-jcn8AAAEAAEa8eVgAAAAG
REDIRECT_HANDLER application/x-httpd-php7
REDIRECT_STATUS 200
UNIQUE_ID Y4-jcn8AAAEAAEa8eVgAAAAG
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_HOST www.whzscsw.com
HTTP_ACCEPT */*
HTTP_ACCEPT_ENCODING gzip
HTTP_COOKIE ssid=8a91b3c3b8c15f7c8cbd62a38268c5e7; lang=zh-cn
PATH /usr/bin:/bin
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SERVER_NAME www.whzscsw.com
SERVER_ADDR 122.114.134.128
SERVER_PORT 80
REMOTE_ADDR 23.230.98.122
DOCUMENT_ROOT /www/users/HA688563/WEB
SERVER_ADMIN vhost@zzidc.com
SCRIPT_FILENAME /www/users/HA688563/WEB/index.php
REMOTE_PORT 32922
REDIRECT_QUERY_STRING s=/index/Article/show/cat_id/15/id/site-product-15.html
REDIRECT_URL /index.php
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING s=/index/Article/show/cat_id/15/id/site-product-15.html
REQUEST_URI /index/Article/show/cat_id/15/id/site-product-15.html
SCRIPT_NAME /index.php
ORIG_SCRIPT_FILENAME /usr/local/zend/php7.2/bin/php-cgi
ORIG_PATH_INFO /index.php
ORIG_PATH_TRANSLATED /www/users/HA688563/WEB/index.php
ORIG_SCRIPT_NAME /php72-cgi
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1670374258.2442
REQUEST_TIME 1670374258