[8] ErrorException in Article.php line 111

未定义数组索引: seo_keywords

  1. $article_details = db('article')->where(['is_check' => 1, 'urlname' => $urlname])->find();
  2. //判断是否存在外链
  3. if($article_details['url']){
  4. echo '<script>window.location.href="'.$article_details['url'].'";</script>';exit;
  5. }
  6. //更新文章的人气
  7. $article_details_hits = db('article')->where(['id' => $article_details['id']])->update(['hits' => $article_details['hits'] + 1]);
  8. $article_details['images'] = explode(",", $article_details['images']);
  9. $article_details['seo_keywords'] = explode(",", $article_details['seo_keywords']);
  10. //设置tdk
  11. $this->set_system($article_details['seo_title'], $article_details['seo_keywords'][0], $article_details['seo_description']);
  12. $this->assign('article_details', $article_details);
  13. //查同类
  14. $cate = db('article_category')->where(['is_check' => 1, 'id' => $article_details['cate_id']])->field('parentid,category,urlname')->find();
  15. $article_category = db('article_category')->where(['is_check' => 1, 'parentid' => $cate['parentid']])->field('id,category,urlname')->order('paixu desc')->select();
  16. $this->assign('article_category', $article_category);
  17. //面包屑
  18. $mbx = '';

Call Stack

  1. in Article.php line 111
  2. at Error::appError(8, 'Undefined index: seo...', 'D:\WWW\ahywlawyer.co...', 111, ['urlname' => 'xwzx345', 'article_category' => [['id' => 1, 'urlname' => 'ywly', 'category' => '业务领域', ...], ['id' => 2, 'urlname' => 'xwzx', 'category' => '新闻中心', ...], ['id' => 3, 'urlname' => 'zxfg', 'category' => '最新法规', ...], ...], 'k' => 4, ...]) in Article.php line 111
  3. at Article->details()
  4. at ReflectionMethod->invokeArgs(object(Article), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(Article), object(ReflectionMethod), ['city' => 'xwzx345', '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))
  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 29

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
PATH C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;
SYSTEMROOT C:\Windows
COMSPEC C:\Windows\system32\cmd.exe
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR C:\Windows
PHP_FCGI_MAX_REQUESTS 1000
PHPRC D:/phpStudy/php56n
_FCGI_SHUTDOWN_EVENT_ 11776
SCRIPT_NAME /index.php
REQUEST_URI /art/xwzx345.html
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /art/xwzx345.html
REMOTE_PORT 60059
SCRIPT_FILENAME D:/WWW/ahywlawyer.com/public/index.php
SERVER_ADMIN admin@phpStudy.net
CONTEXT_DOCUMENT_ROOT D:/WWW/ahywlawyer.com/public
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT D:/WWW/ahywlawyer.com/public
REMOTE_ADDR 192.168.0.9
SERVER_PORT 80
SERVER_ADDR 192.168.0.14
SERVER_NAME www.ahywlawyer.com
SERVER_SOFTWARE Apache/2.4.10 (Win32) OpenSSL/1.0.1i mod_fcgid/2.3.9
SERVER_SIGNATURE
SystemRoot C:\Windows
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_CONNECTION close
HTTP_X_FORWARDED_FOR 54.82.44.149
HTTP_X_REAL_IP 54.82.44.149
HTTP_HOST www.ahywlawyer.com
REDIRECT_STATUS 200
REDIRECT_PATH_INFO art/xwzx345.html
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711664425.4747
REQUEST_TIME 1711664425
Environment Variablesempty
ThinkPHP Constants
DS \
APP_PATH D:\WWW\ahywlawyer.com\public/../application/
CONF_PATH D:\WWW\ahywlawyer.com\public/../config/
PUBILC_PATH D:\WWW\ahywlawyer.com\public/
ROOT_PATH D:\WWW\ahywlawyer.com\public
CACHE_PATH D:\WWW\ahywlawyer.com\public/../runtime/
CONFIG_PATH D:\WWW\ahywlawyer.com\public/../config/
UPLOAD_PATH uploads