[8] ErrorException in Index.php line 203

未定义变量: cate

  1. if ($res['pid'] == 1) {
  2. $titles = $res['title'];
  3. $cate = $res['type'];
  4. if ($titles == '') {
  5. $this->assign('title', '');
  6. }
  7. $this->assign('title', $titles);
  8. }
  9. }
  10. $like = Db::query("SELECT id,name,price,images FROM s_copyright WHERE category_id LIKE '%$cate%' order by access_count desc limit 0,5");
  11. $this->assign('like', $like);
  12. //是否为一口价
  13. $is_one_price = is_numeric(str_replace('¥', '', $data['price']));
  14. $this->assign('is_price', $is_one_price);
  15. $gd = \Db::name('TrademarkJp')->where(['status' => 0])->limit(3)->order('id desc')->select();
  16. $this->assign('gd', $gd);

Call Stack

  1. in Index.php line 203
  2. at Error::appError(8, 'Undefined variable: ...', '/www/wwwroot/www.you...', 203, ['goods' => '106', 'formurl' => 'copyright/Index/deta...', 'user' => null, ...]) in Index.php line 203
  3. at Index->detail('106')
  4. at ReflectionMethod->invokeArgs(object(Index), ['106']) in Container.php line 395
  5. at Container->invokeReflectMethod(object(Index), object(ReflectionMethod), ['goods' => '106']) in Module.php line 131
  6. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  7. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  8. at Middleware->think\{closure}(object(Request))
  9. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  10. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  11. at Module->exec() in Dispatch.php line 168
  12. at Dispatch->run() in App.php line 432
  13. at App->think\{closure}(object(Request), object(Closure), null)
  14. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  15. at Middleware->think\{closure}(object(Request)) in SystemEnvCheck.php line 66
  16. at SystemEnvCheck->handle(object(Request), object(Closure), null)
  17. at call_user_func_array([object(SystemEnvCheck), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 185
  18. at Middleware->think\{closure}(object(Request))
  19. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  20. at Middleware->dispatch(object(Request)) in App.php line 435
  21. at App->run() in index.php line 90

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_REFERER http://jinzhong.youming.com/copyright/index/detail/goods/106.html
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_HOST jinzhong.youming.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.youming.com
SERVER_PORT 443
SERVER_ADDR 172.19.106.102
REMOTE_PORT 39516
REMOTE_ADDR 44.204.218.79
SERVER_SOFTWARE nginx/1.21.4
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /www/wwwroot/www.youming.com/public
DOCUMENT_URI /index.php
REQUEST_URI /copyright/index/detail/goods/106.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/copyright/index/detail/goods/106.html
SCRIPT_FILENAME /www/wwwroot/www.youming.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711665588.8537
REQUEST_TIME 1711665588
Environment Variablesempty
ThinkPHP Constants
QINIU_FUNCTIONS_VERSION 7.3.0
APPLICATION_VERSION v1.4.0
DS /
__MY_HTTP__ https
__MY_ROOT__
__MY_ROOT_PUBLIC__ /
__MY_HOST__ jinzhong.youming.com
__MY_URL__ https://jinzhong.youming.com/
__MY_PUBLIC_URL__ https://jinzhong.youming.com/
__MY_VIEW_URL__ https://jinzhong.youming.com/copyright/index/detail/goods/106.html
ROOT_PATH /www/wwwroot/www.youming.com/public/
ROOT /www/wwwroot/www.youming.com/
APP_PATH /www/wwwroot/www.youming.com/application/
VENFOR_PATH /www/wwwroot/www.youming.com/vendor/
APPLICATION web
APPLICATION_CLIENT default
APPLICATION_CLIENT_TYPE pc
IS_AJAX false
BIND_MODULE trade
BIND_ACTION index