[8] ErrorException in Product.php line 149

未定义数组索引: cover

  1. $data = $this->_product->getOneByName(['id'=>$id]);
  2. // var_dump($data);die;
  3. $type = $this->_Producttype->getOne($data['type_id']);
  4. $type['uname'] = str_replace(" ","-",$type['name']);
  5. $this->assign('type',$type);
  6. $this->_product->up(['id'=>$data['id']],['view_num'=>($data['view_num']+1)]);
  7. //产品图片
  8. $data['img'] = json_decode($data['img'],true);
  9. $data['cover'] = json_decode($data['cover'],true);
  10. $data['video_img'] = json_decode($data['video_img'],true);
  11. //产品参数
  12. $data['params_mm'] = json_decode($data['params_mm'],true);
  13. $data['params_inch'] = json_decode($data['params_inch'],true);
  14. //部件列表
  15. $data['parts'] = json_decode($data['parts'],true);

Call Stack

  1. in Product.php line 149
  2. at Error::appError(8, 'Undefined index: cov...', '/home/wwwroot/tianch...', 149, ['c' => '/product/6.html', 'id' => '/product/6', 'data' => ['img' => null], ...]) in Product.php line 149
  3. at Product->view()
  4. at ReflectionMethod->invokeArgs(object(Product), []) in App.php line 343
  5. at App::invokeMethod([object(Product), 'view'], []) in App.php line 611
  6. at App::module([null, 'product', 'view'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  7. at App::exec(['type' => 'module', 'module' => [null, 'product', 'view'], '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('/home/wwwroot/tianch...') in index.php line 45

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/home/wwwroot/tianchen/tianchen/public/index.php
QUERY_STRING
s=/product/6.html
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/product/6.html
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/home/wwwroot/tianchen/tianchen/public
SERVER_PROTOCOL
HTTP/2.0
REQUEST_SCHEME
https
HTTPS
on
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.20.2
REMOTE_ADDR
3.235.251.99
REMOTE_PORT
33326
SERVER_ADDR
172.20.114.166
SERVER_PORT
443
SERVER_NAME
tianchengroup.com
REDIRECT_STATUS
200
PATH_INFO
/product/6.html
HTTP_HOST
www.tianchengroup.com
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_REFERER
http://www.tianchengroup.com/product/6.html
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711635780.1995
REQUEST_TIME
1711635780
Environment Variables
empty

ThinkPHP Constants

UPLOAD_URL
https://www.tianchengroup.com
WEB_URL
https://www.tianchengroup.com
DEFAULT_MODULE
home
APP_PATH
/home/wwwroot/tianchen/tianchen/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711635780.2002
THINK_START_MEM
263624
EXT
.php
DS
/
THINK_PATH
/home/wwwroot/tianchen/tianchen/thinkphp/
LIB_PATH
/home/wwwroot/tianchen/tianchen/thinkphp/library/
CORE_PATH
/home/wwwroot/tianchen/tianchen/thinkphp/library/think/
TRAIT_PATH
/home/wwwroot/tianchen/tianchen/thinkphp/library/traits/
ROOT_PATH
/home/wwwroot/tianchen/tianchen/
EXTEND_PATH
/home/wwwroot/tianchen/tianchen/extend/
VENDOR_PATH
/home/wwwroot/tianchen/tianchen/vendor/
RUNTIME_PATH
/home/wwwroot/tianchen/tianchen/runtime/
LOG_PATH
/home/wwwroot/tianchen/tianchen/runtime/log/
CACHE_PATH
/home/wwwroot/tianchen/tianchen/runtime/cache/
TEMP_PATH
/home/wwwroot/tianchen/tianchen/runtime/temp/
CONF_PATH
/home/wwwroot/tianchen/tianchen/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false