[8] ErrorException in Show.php line 117

未定义数组索引: title

  1. //$category_names = Db::name('category')->where('id','in',$article['category_ids'])->column('name');
  2. //$this->view->assign('category_names',$category_names);
  3. $article['content'] = str_replace('<br>', '',$article['content']);
  4. $article['content'] = str_replace('src="../uploads','src="/uploads',$article['content']);
  5. $article['content'] = str_replace('<span style="font-size: 18px; line-height: 36px;"><br></span>', '',$article['content']);
  6. $article['content'] = str_replace('<span style="font-size: 14px;"><br></span>', '',$article['content']);
  7. $this->view->assign('article',$article);
  8. $this->view->assign('title',isset($article['seotitle'])?$article['seotitle']:$article['title']);
  9. //相关专题处理
  10. if(!$this->redis->has('topic_'.$id))
  11. {
  12. $topics = Db::name('topic')->field('id,title')->where("article_ids like '%$id%'")->select();
  13. $this->redis->set('topic_'.$id,$topics,186400);
  14. }else{
  15. $topics = $this->redis->get('topic_'.$id);

Call Stack

  1. in Show.php line 117
  2. at Error::appError(8, 'Undefined index: tit...', '/www/wwwobject/test/...', 117, ['id' => 58181, 'module_name' => 'index', 'article' => ['content' => ''], ...]) in Show.php line 117
  3. at Show->article()
  4. at ReflectionMethod->invokeArgs(object(Show), []) in App.php line 197
  5. at App::invokeMethod([object(Show), 'article'], []) in App.php line 411
  6. at App::module(['index', 'show', 'article'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 296
  7. at App::exec(['type' => 'module', 'module' => ['index', 'show', 'article'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 124
  8. at App::run() in start.php line 19
  9. at require('/www/wwwobject/test/...') in index.php line 29

Exception Datas

Error Context
id 58181
module_name index
article { "content": "" }
condition keywords like "%%"
related [ { "id": 94713, "title": "\u667a\u6167\u6210\u90fd\u3001\u9b45\u529b\u540c\u884c \u56db\u5ddd\u8054\u901a\u3001\u534e\u4e3a\u4e0e\u6210\u90fd\u5927\u60a6\u57ce\u643a\u624b\u6253\u9020\u897f\u5357\u9996\u4e2a5G-A\u5168\u8986\u76d6MALL\u5546\u4e1a\u4f53", "image": "http:\/\/image.cfyys.com.cn\/17117034609108e03515b09b.jpeg", "publish_time": 1711703468 }, { "id": 94709, "title": "TCL\u7535\u5b50\uff0801070.HK\uff092023\u5e74\u5149\u4f0f\u4e1a\u52a1\u6536\u5165\u540c\u6bd4\u9ad8\u589e18\u500d \u4e1a\u52a1\u89c4\u6a21\u6307\u6570\u7ea7\u6269\u5f20", "image": "http:\/\/image.cfyys.com.cn\/17117002653811c2cc8b4996.jpeg", "publish_time": 1711700292 }, { "id": 94708, "title": "\u535a\u9ccc\u4e9a\u6d32\u8bba\u575b2024\u5e74\u4f1a\u4e28\u4e2d\u5174\u901a\u8baf\uff1a\u63a8\u8fdb\u6570\u5b9e\u878d\u5408 \u52a9\u529b\u5168\u7403\u6570\u5b57\u7ecf\u6d4e\u9ad8\u8d28\u91cf\u53d1\u5c55", "image": "http:\/\/image.cfyys.com.cn\/1711697765525585cc11f995.jpeg", "publish_time": 1711697781 }, { "id": 94707, "title": "\u4efb\u6cfd\u5e73\u4eac\u4e1c\u91d1\u878dApp\u4e13\u573a\u76f4\u64ad\uff1a\u8d5a\u94b1\u4e0d\u8f9b\u82e6\u7684\u884c\u4e1a\u4f1a\u8bde\u751f\u5927\u725b\u80a1", "image": "http:\/\/image.cfyys.com.cn\/17116975056120ebf22d7ad3.jpeg", "publish_time": 1711697561 } ]

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty

Session

think
{ "session_url": "\/show-list-58181.html" }

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwobject/test/cfyys.com.cn/public/index.php
QUERY_STRING
s=/show-list-58181.html
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/show-list-58181.html
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/www/wwwobject/test/cfyys.com.cn/public
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
http
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.22.0
REMOTE_ADDR
54.145.12.28
REMOTE_PORT
41636
SERVER_ADDR
192.168.0.2
SERVER_PORT
80
SERVER_NAME
www.cfyys.com.cn
REDIRECT_STATUS
200
PATH_INFO
/show-list-58181.html
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
cfyys.com.cn
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711703665.1881
REQUEST_TIME
1711703665
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwobject/test/cfyys.com.cn/public/../application/
THINK_VERSION
5.0.11
THINK_START_TIME
1711703665.189
THINK_START_MEM
261440
EXT
.php
DS
/
THINK_PATH
/www/wwwobject/test/cfyys.com.cn/thinkphp/
LIB_PATH
/www/wwwobject/test/cfyys.com.cn/thinkphp/library/
CORE_PATH
/www/wwwobject/test/cfyys.com.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwobject/test/cfyys.com.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwobject/test/cfyys.com.cn/
EXTEND_PATH
/www/wwwobject/test/cfyys.com.cn/extend/
VENDOR_PATH
/www/wwwobject/test/cfyys.com.cn/vendor/
RUNTIME_PATH
/www/wwwobject/test/cfyys.com.cn/runtime/
LOG_PATH
/www/wwwobject/test/cfyys.com.cn/runtime/log/
CACHE_PATH
/www/wwwobject/test/cfyys.com.cn/runtime/cache/
TEMP_PATH
/www/wwwobject/test/cfyys.com.cn/runtime/temp/
CONF_PATH
/www/wwwobject/test/cfyys.com.cn/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/www/wwwobject/test/cfyys.com.cn/addons/