[8] ErrorException in Article.php line 29

未定义数组索引: mainDb

  1. {
  2. $channel = intval(input('param.channel'));
  3. $id = intval(input('param.id'));
  4. $unique = safeText(input('param.unique'), true);
  5. $page = intval(input('param.page', 1));
  6. $draft = intval(input('param.draft'), 0);
  7. $articleData = returnArticleData($channel, $id, $unique, $page, $draft, $this->langset);
  8. $articleData['mainDb']->where($articleData['where'])->setInc('clicks');//点击数
  9. $data = $articleData['data'];
  10. $this->currentChannel = $data['channel'];
  11. if (in_array($data['channel'], [43, 44])) {
  12. $articleData['data']['keyboard'] = array_filter(explode(',', $data['keyboard']));
  13. $articleData['data']['news_time'] = date('Y-m-d', $articleData['data']['news_time']);
  14. $articleData['data']['recommend_list'] = $articleData['mainDb']
  15. ->where(['channel' => $data['channel'], 'id' => ['<>', $data['id']]])

Call Stack

  1. in Article.php line 29
  2. at Error::appError(8, 'Undefined index: mai...', '/www/web/ejian_net/w...', 29, ['channel' => 19, 'id' => 23, 'unique' => '', ...]) in Article.php line 29
  3. at Article->index()
  4. at ReflectionMethod->invokeArgs(object(Article), []) in App.php line 362
  5. at App::invokeMethod([object(Article), 'index'], []) in App.php line 630
  6. at App::module([null, 'Article', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 475
  7. at App::exec(['type' => 'module', 'module' => [null, 'Article', 'index'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 158
  8. at App::run() in start.php line 18
  9. at require('/www/web/ejian_net/w...') 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
/dev/null
HTTP_HOST
www.ejian.net
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
REDIRECT_STATUS
200
SERVER_NAME
ejian.net
SERVER_PORT
80
SERVER_ADDR
172.26.175.33
REMOTE_PORT
60808
REMOTE_ADDR
54.173.221.132
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/web/ejian_net/public_html
DOCUMENT_URI
/index.php
REQUEST_URI
/expert-view/23.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=//expert-view/23.html
SERVER_SOFTWARE
nginx
GATEWAY_INTERFACE
CGI/1.1
PATH_INFO
//expert-view/23.html
SCRIPT_FILENAME
/www/web/ejian_net/public_html/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711661525.912
REQUEST_TIME
1711661525
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/web/ejian_net/public_html/../wogee/app/
CONF_PATH
/www/web/ejian_net/public_html/../wogee/config/
THINK_VERSION
5.0.24
THINK_START_TIME
1711661525.9124
THINK_START_MEM
412808
EXT
.php
DS
/
THINK_PATH
/www/web/ejian_net/wogee/framework/
LIB_PATH
/www/web/ejian_net/wogee/framework/library/
CORE_PATH
/www/web/ejian_net/wogee/framework/library/think/
TRAIT_PATH
/www/web/ejian_net/wogee/framework/library/traits/
ROOT_PATH
/www/web/ejian_net/wogee/
EXTEND_PATH
/www/web/ejian_net/wogee/extend/
VENDOR_PATH
/www/web/ejian_net/wogee/vendor/
RUNTIME_PATH
/www/web/ejian_net/wogee/runtime/
LOG_PATH
/www/web/ejian_net/wogee/runtime/log/
CACHE_PATH
/www/web/ejian_net/wogee/runtime/cache/
TEMP_PATH
/www/web/ejian_net/wogee/runtime/temp/
CONF_EXT
.php
ENV_PREFIX
PHP_
__PUBLIC__
public_html
__ROOT_PATH__
/www/web/ejian_net/
__WOGEE_VERSION__
4.2.0
__TIME__
1711661525
IS_CLI
false
IS_WIN
false
HTMLPURIFIER_PREFIX
/www/web/ejian_net/wogee/extend/htmlpurifier