[8] ErrorException in News.php line 426

未定义数组索引: clicks

  1. //处理url 及面包屑的层级数 如果所属分类有顶级分类,需要加上顶级分类这一层
  2. $parent_cate=get_parent_cate($article);
  3. //点击浏览量加1,存入数据库
  4. $clicks = $article['clicks'] + 1;
  5. $con = mysqli_connect("localhost", "root", "xinhai%1234",'xhcms');
  6. $sql = "update article set clicks = " . $clicks. " where url_id=" .$url_id;
  7. mysqli_query($con,$sql);
  8. $article['clicks']+=1;#页面展示用,不用再从数据库中获取最新的点击量
  9. $article['cate_name']=$categorys['name'];
  10. $articleContent = ArticleContent::where('art_id',$article['url_id'])->find();
  11. //根据标签获取相关产品 标签为— 表示没有标签
  12. $tagStr = $article['tag_id'];
  13. $relative_pro = [];
  14. $catemodel = model('Procate');
  15. $model = model('Products');
  16. $result = $this->tag_pro_case($tagStr,$relative_pro,$catemodel,$model);
  17. //从相关产品中随机获取三个

Call Stack

  1. in News.php line 426
  2. at Error::appError(8, 'Undefined index: cli...', '/opt/lampp/htdocs/cs...', 426, ['cate' => 'jiankang', 'url_id' => 'casegdgtgt', 'categorys' => null, ...]) in News.php line 426
  3. at News->show()
  4. at ReflectionMethod->invokeArgs(object(News), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(News), object(ReflectionMethod), ['cate' => 'jiankang', 'url_id' => 'casegdgtgt', '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 27

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
REDIRECT_UNIQUE_ID XeoIBgoa-mYAABhEiBQAAAAL
REDIRECT_PATH_INFO jiankang/casegdgtgt.html
REDIRECT_STATUS 200
UNIQUE_ID XeoIBgoa-mYAABhEiBQAAAAL
HTTP_HOST www.worldsgreatestmusicstore.com
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT */*
PATH /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH /opt/lampp/lib:/opt/lampp/lib
SERVER_SIGNATURE
SERVER_SOFTWARE Apache/2.4.16 (Unix) OpenSSL/1.0.1p PHP/5.6.12 mod_perl/2.0.8-dev Perl/v5.16.3
SERVER_NAME www.worldsgreatestmusicstore.com
SERVER_ADDR 118.178.124.54
SERVER_PORT 80
REMOTE_ADDR 156.232.248.190
DOCUMENT_ROOT /opt/lampp/htdocs/cs.ytxinhai.com/public
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /opt/lampp/htdocs/cs.ytxinhai.com/public
SERVER_ADMIN mail@worldsgreatestmusicstore.com
SCRIPT_FILENAME /opt/lampp/htdocs/cs.ytxinhai.com/public/index.php
REMOTE_PORT 60107
REDIRECT_URL /jiankang/casegdgtgt.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /jiankang/casegdgtgt.html
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1575618566.879
REQUEST_TIME 1575618566
Environment Variablesempty
ThinkPHP Constants
UPLOADPATH /opt/lampp/htdocs/cs.ytxinhai.com/public
IMGPATH ./uploads/