[8] ErrorException in Article.php line 38

未定义数组索引: content

  1. $catename = '';
  2. $ArticleInfo = new GetArticleInfo();
  3. $article = $ArticleInfo->getArticle($articleId);
  4. //关键词逻辑
  5. $crux = db('crux')->select();
  6. foreach($crux as $v){
  7. $crul_article = db('crux')->where(array('id'=>$v['id']))->find();
  8. if(strpos($article['content'],$crul_article['crux']) == -1){
  9. $article['content'] = $article['content'];
  10. }else{
  11. if($crul_article['is_blank'] == '0'){
  12. $article['content'] = str_replace($crul_article['crux'],"<a href=".$crul_article['crux_link'].">".$crul_article['crux']."</a>",$article['content']);
  13. }else{
  14. $article['content'] = str_replace($crul_article['crux'],"<a href=".$crul_article['crux_link']." target='_blank'>".$crul_article['crux']."</a>",$article['content']);
  15. }
  16. }

Call Stack

  1. in Article.php line 38
  2. at Error::appError(8, 'Undefined index: con...', '/www/wwwroot/api.tao...', 38, ['param' => ['cate' => 'tuiguang', 'id' => '21298', 'author_name' => null, ...], 'articleId' => '21298', 'article' => ['catepy' => null, 'catename' => null], ...]) in Article.php line 38
  3. at Article->article()
  4. at ReflectionMethod->invokeArgs(object(Article), []) in App.php line 343
  5. at App::invokeMethod([object(Article), 'article'], []) in App.php line 611
  6. at App::module(['index', 'article', 'article'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['index', 'article', 'article'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  8. at App::run() in start.php line 19
  9. at require('/www/wwwroot/api.tao...') in index.php line 17

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_REFERER
https://www.taofake.com/article/tuiguang/21298.html
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.taofake.com.cn
PATH_INFO
/article/tuiguang/21298.html
REDIRECT_STATUS
200
SERVER_NAME
api.taofake.com
SERVER_PORT
443
SERVER_ADDR
103.45.98.69
REMOTE_PORT
44138
REMOTE_ADDR
3.90.33.254
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/www/wwwroot/api.taofake.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/article/tuiguang/21298.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/article/tuiguang/21298.html
SCRIPT_FILENAME
/www/wwwroot/api.taofake.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711635288.0353
REQUEST_TIME
1711635288
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/api.taofake.com/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711635288.0363
THINK_START_MEM
404112
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/api.taofake.com/thinkphp/
LIB_PATH
/www/wwwroot/api.taofake.com/thinkphp/library/
CORE_PATH
/www/wwwroot/api.taofake.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/api.taofake.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/api.taofake.com/
EXTEND_PATH
/www/wwwroot/api.taofake.com/extend/
VENDOR_PATH
/www/wwwroot/api.taofake.com/vendor/
RUNTIME_PATH
/www/wwwroot/api.taofake.com/runtime/
LOG_PATH
/www/wwwroot/api.taofake.com/runtime/log/
CACHE_PATH
/www/wwwroot/api.taofake.com/runtime/cache/
TEMP_PATH
/www/wwwroot/api.taofake.com/runtime/temp/
CONF_PATH
/www/wwwroot/api.taofake.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258