[8] ErrorException in Product.php line 15

未定义数组索引: contents

  1. class Product extends HomeBase
  2. {
  3. public function view($t=0)
  4. {
  5. $id = $this->request->param('id/d');
  6. $product = db('product')->where('id', $id)->find();
  7. $product['photo']=unserialize( $product['photo']);
  8. $info=unserialize( $product['contents']);
  9. if(!empty($info)){
  10. foreach($info as $info_k=>$info_v){
  11. $info_v['contents']=str_replace('×','×',$info_v['contents']);
  12. $info_v['contents']=str_replace('Ω','Ω',$info_v['contents']);
  13. $info_v['contents']=str_replace('≤','≤',$info_v['contents']);
  14. $info_v['contents']=str_replace('Φ','Φ',$info_v['contents']);
  15. $info[$info_k]['contents']=str_replace('φ','Φ',$info_v['contents']);
  16. }
  17. }

Call Stack

  1. in Product.php line 15
  2. at Error::appError(8, 'Undefined index: con...', '/usr/home/hyu7903200...', 15, ['t' => 0, 'id' => 61, 'product' => ['photo' => false]]) in Product.php line 15
  3. at Product->view(0)
  4. at ReflectionMethod->invokeArgs(object(Product), [0]) in App.php line 343
  5. at App::invokeMethod([object(Product), 'view'], []) in App.php line 611
  6. at App::module(['index', 'Product', 'view'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 457
  7. at App::exec(['type' => 'module', 'module' => ['index', 'Product', 'view']], ['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('/usr/home/hyu7903200...') in index.php line 17

Environment Variables

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

Server/Request Data

DOCUMENT_ROOT
/usr/home/hyu7903200001/htdocs
GATEWAY_INTERFACE
CGI/1.1
HTTP_ACCEPT
*/*
HTTP_HOST
www.acrel-ctf.com
HTTP_USER_AGENT
claudebot
PATH
/bin
PHPRC
/var/www/php55/hichina_ini/hyu7903200001
QUERY_STRING
REDIRECT_DOCUMENT_ROOT
/usr/home/hyu7903200001/htdocs
REDIRECT_GATEWAY_INTERFACE
CGI/1.1
REDIRECT_HTTP_ACCEPT
*/*
REDIRECT_HTTP_HOST
www.acrel-ctf.com
REDIRECT_HTTP_USER_AGENT
claudebot
REDIRECT_PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REDIRECT_PATH_INFO
/Product/view/id/61.html
REDIRECT_PATH_TRANSLATED
redirect:/index.php/Product/view/id/61.html/view/id/61.html
REDIRECT_QUERY_STRING
REDIRECT_REMOTE_ADDR
54.234.233.157
REDIRECT_REMOTE_PORT
42954
REDIRECT_REQUEST_METHOD
GET
REDIRECT_REQUEST_URI
/index/Product/view/id/61.html
REDIRECT_SCRIPT_FILENAME
/usr/home/hyu7903200001/htdocs/index
REDIRECT_SCRIPT_NAME
/index
REDIRECT_SCRIPT_URI
http://www.acrel-ctf.com/index/Product/view/id/61.html
REDIRECT_SCRIPT_URL
/index/Product/view/id/61.html
REDIRECT_SERVER_ADDR
10.21.69.181
REDIRECT_SERVER_ADMIN
webmaster@hyu7903200001.my3w.com
REDIRECT_SERVER_NAME
www.acrel-ctf.com
REDIRECT_SERVER_PORT
80
REDIRECT_SERVER_PROTOCOL
HTTP/1.1
REDIRECT_SERVER_SIGNATURE
REDIRECT_SERVER_SOFTWARE
Apache
REDIRECT_STATUS
200
REDIRECT_TZ
Asia/Shanghai
REDIRECT_UNIQUE_ID
ZgZfxQoVRbUAHpXWakQAAAAO
REDIRECT_URL
/index/Product/view/id/61.html
REMOTE_ADDR
54.234.233.157
REMOTE_PORT
42954
REQUEST_METHOD
GET
REQUEST_URI
/index/Product/view/id/61.html
SCRIPT_FILENAME
/usr/home/hyu7903200001/htdocs/index.php
SCRIPT_NAME
/index.php
SCRIPT_URI
http://www.acrel-ctf.com/index/Product/view/id/61.html
SCRIPT_URL
/index/Product/view/id/61.html
SERVER_ADDR
10.21.69.181
SERVER_ADMIN
webmaster@hyu7903200001.my3w.com
SERVER_NAME
www.acrel-ctf.com
SERVER_PORT
80
SERVER_PROTOCOL
HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
TZ
Asia/Shanghai
UNIQUE_ID
ZgZfxQoVRbUAHpXWakQAAAAO
ORIG_PATH_INFO
/index/Product/view/id/61.html
ORIG_PATH_TRANSLATED
/usr/home/hyu7903200001/htdocs/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711693765.8104
REQUEST_TIME
1711693765
PATH_INFO
/index/Product/view/id/61.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/usr/home/hyu7903200001/htdocs/application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711693765.8108
THINK_START_MEM
247336
EXT
.php
DS
/
THINK_PATH
/usr/home/hyu7903200001/htdocs/thinkphp/
LIB_PATH
/usr/home/hyu7903200001/htdocs/thinkphp/library/
CORE_PATH
/usr/home/hyu7903200001/htdocs/thinkphp/library/think/
TRAIT_PATH
/usr/home/hyu7903200001/htdocs/thinkphp/library/traits/
ROOT_PATH
/usr/home/hyu7903200001/htdocs/
EXTEND_PATH
/usr/home/hyu7903200001/htdocs/extend/
VENDOR_PATH
/usr/home/hyu7903200001/htdocs/vendor/
RUNTIME_PATH
/usr/home/hyu7903200001/htdocs/runtime/
LOG_PATH
/usr/home/hyu7903200001/htdocs/runtime/log/
CACHE_PATH
/usr/home/hyu7903200001/htdocs/runtime/cache/
TEMP_PATH
/usr/home/hyu7903200001/htdocs/runtime/temp/
CONF_PATH
/usr/home/hyu7903200001/htdocs/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false