[8] ErrorException in Buy.php line 139

未定义数组索引: vid

  1. public function info()
  2. {
  3. header("Access-Control-Allow-Origin: *");
  4. header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");
  5. header('Access-Control-Allow-Headers:x-requested-with,content-type');
  6. $userid = input('userid');//登录账号id
  7. $goodsid = input('goodsid');//求购产品id
  8. $info = Db::name('store_buy')->where(['id'=>$goodsid])->find();
  9. $info['imgs'] = explode(',', $info['imgs']);
  10. $company_member = Db::name('store_member')->where(['id'=>$info['vid']])->find();
  11. if($company_member['vip_type']==2){
  12. $company = Db::name('store_company')->where(['vid'=>$company_member['id']])->field('id,name,tel,provid,cityid,contact,address')->find();
  13. $info['company_id'] = $company['id'];
  14. $info['company_name'] = $company['name'];
  15. $info['company_tel'] = $company['tel'];
  16. $info['company_provid'] = $company['provid'];
  17. $info['company_cityid'] = $company['cityid'];
  18. $info['company_contact'] = $company['contact'];
  19. $info['company_address'] = $company['address'];

Call Stack

  1. in Buy.php line 139
  2. at Error::appError(8, 'Undefined index: vid', '/data/wwwroot/cnfzfl...', 139, ['userid' => null, 'goodsid' => null, 'info' => ['imgs' => ['']]]) in Buy.php line 139
  3. at Buy->info()
  4. at ReflectionMethod->invokeArgs(object(Buy), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(Buy), object(ReflectionMethod), []) in Module.php line 132
  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 137
  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 sys.php line 116
  16. at {closure}(object(Request), object(Closure), null)
  17. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  18. at Middleware->think\{closure}(object(Request)) in common.php line 220
  19. at {closure}(object(Request), object(Closure), null)
  20. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  21. at Middleware->think\{closure}(object(Request))
  22. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  23. at Middleware->dispatch(object(Request)) in App.php line 435
  24. at App->run() in index.php line 22

Environment Variables

GET Data
id 6073
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
TEMP /tmp
TMPDIR /tmp
TMP /tmp
PATH /usr/local/bin:/usr/bin:/bin
USER www
HOME /home/www
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_HOST www.cnfzflw.com
PATH_INFO /index/buy/info.html
REDIRECT_STATUS 200
SERVER_NAME www.cnfzflw.com
SERVER_PORT 443
SERVER_ADDR 172.26.195.76
REMOTE_PORT 47092
REMOTE_ADDR 54.205.238.173
SERVER_SOFTWARE nginx/1.18.0
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /data/wwwroot/cnfzflw/public
DOCUMENT_URI /index.php
REQUEST_URI /index.php/index/buy/info.html?id=6073
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING id=6073
SCRIPT_FILENAME /data/wwwroot/cnfzflw/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php/index/buy/info.html
REQUEST_TIME_FLOAT 1711628962.4096
REQUEST_TIME 1711628962
Environment Variablesempty
ThinkPHP Constants
QINIU_FUNCTIONS_VERSION 7.2.7