[8] ErrorException in Supply.php line 98

未定义数组索引: id

  1. //$supply['quality'] = config("quality")[$supply['quality']];
  2. $supply['cates'] = db("spzs_cate")->where("id = {$supply['cate']}")->find()['name'];
  3. $supply['ci'] = $this->area->where("codeid = {$supply['province']}")->find()['cityName'];
  4. $supply['shang'] = db('supply')->where("id > {$id}")->order("id desc")->find();
  5. $supply['xia'] = db('supply')->where("id < {$id}")->order("id desc")->find();
  6. if($supply['company'] > 0){
  7. $supply['company'] = $this->company->find($supply['company']);
  8. $supply['company']['group'] = db("group")->find($supply['company']['groupid'])['groupname']; //会员类型
  9. //企业其它产品
  10. $other_supply = db("supply")->where("aid = {$supply['aid']} and company = {$supply['company']['id']} and id != {$id}")->order("id desc")->limit(8)->select();
  11. }else{
  12. $supply['per'] = db("agent_user")->find($supply['aid']);
  13. //个人其它产品
  14. $other_supply = db("supply")->where("aid = {$supply['aid']} and company = 0 and id != {$id}")->order("id desc")->limit(8)->select();
  15. }
  16. $this->assign("supply",$supply);
  17. $this->assign("other_supply",$other_supply);
  18. //最新供应信息
  19. $new_supply = db("supply")->order("id desc")->limit(12)->select();

Call Stack

  1. in Supply.php line 98
  2. at Error::appError(8, 'Undefined index: id', '/www/wwwroot/www.118...', 98, ['id' => '52', 'daohang' => [['id' => 6, 'name' => '饮料饮品', 'tag' => '饮料招商', ...], ['id' => 7, 'name' => '方便食品', 'tag' => '方便食品', ...], ['id' => 9, 'name' => '罐头食品', 'tag' => '小食品招商', ...]], 'supply' => ['id' => 52, 'aid' => 19, 'title' => '供应测试', ...]]) in Supply.php line 98
  3. at Supply->spinfo('52')
  4. at ReflectionMethod->invokeArgs(object(Supply), ['52']) in App.php line 343
  5. at App::invokeMethod([object(Supply), 'spinfo'], []) in App.php line 611
  6. at App::module(['index', 'supply', 'spinfo'], ['app_host' => 'http://118m.cn', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 457
  7. at App::exec(['type' => 'module', 'module' => ['index', 'supply', 'spinfo']], ['app_host' => 'http://118m.cn', '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/www.118...') in index.php line 29

Environment Variables

GET Data

/index/supply/spinfo/id/52_shtml
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
REDIRECT_STATUS
200
proxy-nokeepalive
1
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
HTTP_HOST
www.118m.cn
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
deflate, gzip
PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin
LD_LIBRARY_PATH
/www/server/apache/lib
SERVER_SIGNATURE
<address>Apache Server at www.118m.cn Port 80</address>
SERVER_SOFTWARE
Apache
SERVER_NAME
www.118m.cn
SERVER_ADDR
172.16.0.4
SERVER_PORT
80
REMOTE_ADDR
142.234.9.131
DOCUMENT_ROOT
/www/wwwroot/www.118m.cn
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/www.118m.cn
SERVER_ADMIN
webmaster@example.com
SCRIPT_FILENAME
/www/wwwroot/www.118m.cn/index.php
REMOTE_PORT
20001
REDIRECT_URL
/index/supply/spinfo/id/52.shtml
REDIRECT_QUERY_STRING
/index/supply/spinfo/id/52.shtml
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
/index/supply/spinfo/id/52.shtml
REQUEST_URI
/index/supply/spinfo/id/52.shtml
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1571521209.519
REQUEST_TIME
1571521209
PATH_INFO
/index/supply/spinfo/id/52.shtml
Environment Variables
empty

ThinkPHP Constants

DOMAIN
118m.cn
APP_PATH
/www/wwwroot/www.118m.cn/app/
TPLAY_VERSION
1.3.3
EXTEND_PATH
/www/wwwroot/www.118m.cn/extend/
VENDOR_PATH
/www/wwwroot/www.118m.cn/vendor/
THINK_VERSION
5.0.23
THINK_START_TIME
1571521209.5198
THINK_START_MEM
265688
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.118m.cn/thinkphp/
LIB_PATH
/www/wwwroot/www.118m.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/www.118m.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.118m.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.118m.cn/
RUNTIME_PATH
/www/wwwroot/www.118m.cn/runtime/
LOG_PATH
/www/wwwroot/www.118m.cn/runtime/log/
CACHE_PATH
/www/wwwroot/www.118m.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/www.118m.cn/runtime/temp/
CONF_PATH
/www/wwwroot/www.118m.cn/app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false