[8] ErrorException in index.php line 16

Undefined index: id

  1. {
  2. protected function initialize()
  3. {
  4. parent::initialize();
  5. }
  6. public function run($param=[]) {
  7. $where = [];
  8. $where[] = ['A.w_id', '=', $this->config['id']];
  9. $where[] = ['A.id', '=', $param['id']];
  10. $where[] = ['A.status', '=', 1];
  11. $info = \think\Db::name('shop')->alias('A')
  12. ->field('A.*, B.shop_id, B.chicun, B.money as g_money, B.hongli as g_hongli, C.title as type_title')
  13. ->leftJoin('shop_guige B', 'A.id = B.shop_id')
  14. ->leftJoin('shop_type C', 'A.type_id = C.id')
  15. ->where($where)
  16. ->group('A.id')
  17. ->find();
  18. if (!$info) {

Call Stack

  1. in index.php line 16
  2. at Error::appError(8, 'Undefined index: id', '/www/wwwroot/www.17s...', 16, ['param' => ['pid' => '95'], 'where' => [['A.w_id', '=', 10]]]) in index.php line 16
  3. at index->run(['pid' => '95']) in _Index.php line 103
  4. at _Index->_autoload() in Products.php line 11
  5. at Products->initialize() in Controller.php line 135
  6. at Controller->__construct(object(App))
  7. at ReflectionClass->newInstanceArgs([object(App)]) in Container.php line 439
  8. at Container->invokeClass('app\index\controller...', []) in Container.php line 284
  9. at Container->make('app\index\controller...', []) in App.php line 1449
  10. at App->controller('Products', 'controller', false, 'Error') in Module.php line 95
  11. at Module->exec() in Dispatch.php line 335
  12. at Dispatch->run() in App.php line 863
  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))
  16. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  17. at Middleware->dispatch(object(Request)) in App.php line 869
  18. at App->run() in index.php line 31

Environment Variables

GET Data
pid 95
POST Dataempty
Filesempty
Cookies
4f598b3ac520b585f41c1cc5e91fe5d4 1
Session
think { "actoken": "08b5f536f8e045e8a72e6a3cb96d5c5a" }
Server/Request Data
USER www
HOME /home/www
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_HOST www.17go8.com.tw
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.17go8.com.tw
SERVER_PORT 443
SERVER_ADDR 61.216.114.55
REMOTE_PORT 45730
REMOTE_ADDR 52.90.181.205
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/www.17store.shop
DOCUMENT_URI /index.php
REQUEST_URI /product_detail?pid=95
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/product_detail.html&pid=95
SCRIPT_FILENAME /www/wwwroot/www.17store.shop/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710843093.5318
REQUEST_TIME 1710843093
Environment Variablesempty
ThinkPHP Constants
APP_PATH /www/wwwroot/www.17store.shop/app/
__EDITION__ v1.0.1
__ADMIN__ /public/admin
__INDEX__ /public/index
__PULOADS__ /public/data/images
__XLXS__ /public/data/excel
ROOT_PATH /www/wwwroot/www.17store.shop