[8] ErrorException in Power.php line 37

未定义数组索引: classic_id

  1. public function content($id)
  2. {
  3. $back = Db::name('nav') -> where('title', '产品展示') -> find();
  4. $data = Db::name('power') -> find($id);
  5. $photo = $data['photo'] ;
  6. $data['photo'] = explode(',', $photo);
  7. // var_dump($data['photo']);
  8. $classic = Db::name('powerclassic') -> where('id', $data['classic_id']) -> find();
  9. // 上一篇
  10. $where_up['id'] = array('lt', input('id'));
  11. $up = DB::name('product') -> where($where_up) -> order('id desc') -> find();
  12. // 下一篇
  13. $where_down['id'] = array('gt', input('id'));
  14. $down = DB::name('product') -> where($where_down) -> find();

Call Stack

  1. in Power.php line 37
  2. at Error::appError(8, 'Undefined index: cla...', '/www/wwwroot/chijian...', 37, ['id' => '169', 'back' => null, 'data' => ['photo' => ['']], ...]) in Power.php line 37
  3. at Power->content('169')
  4. at ReflectionMethod->invokeArgs(object(Power), ['169']) in App.php line 343
  5. at App::invokeMethod([object(Power), 'content'], []) in App.php line 611
  6. at App::module(['index', 'power', 'content'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['index', 'power', 'content']], ['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/chijian...') in index.php line 16

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
chijianinsight.com
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
/index/power/content/id/169.html
REDIRECT_STATUS
200
SERVER_NAME
chijianinsight.com
SERVER_PORT
80
SERVER_ADDR
172.31.249.198
REMOTE_PORT
50622
REMOTE_ADDR
18.206.160.129
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/chijianinsight.com
DOCUMENT_URI
/index.php
REQUEST_URI
/index/power/content/id/169.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/index/power/content/id/169.html
SCRIPT_FILENAME
/www/wwwroot/chijianinsight.com/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711666331.4818
REQUEST_TIME
1711666331
Environment Variables
empty

ThinkPHP Constants

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