[8] ErrorException in Product.php line 71

未定义数组索引: cate_id

  1. return $this->fetch();
  2. }
  3. //产品详情
  4. public function detail(){
  5. $id = input("id");
  6. $row = Db::name("article")->where(["id"=>$id])->find();
  7. $row["create_time"] = $row["show_time"];
  8. $cate_id = $row["cate_id"];
  9. $category = Db::name("category")->where(["id"=>$cate_id])->find();
  10. $bgimg = $category["bgimg"] ? $category["bgimg"] : Db::name("category")->where(["id"=>$category["parent_id"]])->value("bgimg");
  11. $this->assign("bgimg",$bgimg);
  12. $wap_bgimg = $category["wap_bgimg"] ? $category["wap_bgimg"] : Db::name("category")->where(["id"=>$category["parent_id"]])->value("wap_bgimg");
  13. $this->assign("wap_bgimg",$wap_bgimg);
  14. $this->assign("category",$category);
  15. $seo = [];
  16. $seo["title"] = $this->setting["title"]["value"]."-".$row["title"];

Call Stack

  1. in Product.php line 71
  2. at Error::appError(8, 'Undefined index: cat...', '/www/wwwroot/biaozhi...', 71, ['id' => '202', 'row' => ['create_time' => null]]) in Product.php line 71
  3. at Product->detail()
  4. at ReflectionMethod->invokeArgs(object(Product), []) in App.php line 343
  5. at App::invokeMethod([object(Product), 'detail'], []) in App.php line 611
  6. at App::module(['portal', 'product', 'detail'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['portal', 'product', 'detail']], ['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/biaozhi...') in index.php line 14

Environment Variables

GET Data

id
202
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.peugeot-motocycles.com.cn
PATH_INFO
/portal/product/detail
REDIRECT_STATUS
200
SERVER_NAME
peugeot-motocycles.com.cn
SERVER_PORT
443
SERVER_ADDR
172.25.205.115
REMOTE_PORT
50852
REMOTE_ADDR
35.153.156.108
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/www/wwwroot/biaozhimotuo.longcai0531.cn
DOCUMENT_URI
/index.php
REQUEST_URI
/portal/product/detail?id=202
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/portal/product/detail&id=202
SCRIPT_FILENAME
/www/wwwroot/biaozhimotuo.longcai0531.cn/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711707369.4193
REQUEST_TIME
1711707369
Environment Variables
empty

ThinkPHP Constants

IS_PUBLIC
false
ROOT_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/
PUBLIC_NAME
public
APP_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/application/
WEJOY_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/zhmx/
EXTEND_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/zhmx/extend/
VENDOR_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/zhmx/vendor/
THINK_VERSION
5.0.24
THINK_START_TIME
1711707369.4198
THINK_START_MEM
400664
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/zhmx/thinkphp/
LIB_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/zhmx/thinkphp/library/
CORE_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/zhmx/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/zhmx/thinkphp/library/traits/
RUNTIME_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/runtime/
LOG_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/runtime/log/
CACHE_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/runtime/temp/
CONF_PATH
/www/wwwroot/biaozhimotuo.longcai0531.cn/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
APP_DEBUG
true
MODEL
0
IS_CLI
false
IS_WIN
false