[8] ErrorException in Index.php line 530

未定义数组索引: id

  1. $this->assign('behind',$behind[0]['id']);
  2. }
  3. return $this->fetch();
  4. }
  5. public function show2()
  6. {
  7. $M = input();
  8. $res = Db::name($M['TBname'])->where('type',$M['type'])->where('id',$M['id'])->select();
  9. $front = Db::name($M['TBname'])->where('type',$M['type'])->where('id','<',$M['id'])->order("id ASC")->select();
  10. if( (count($front)-1)>=0)
  11. $front[0] = $front[count($front)-1];
  12. $behind = Db::name($M['TBname'])->where('type',$M['type'])->where('id','>',$M['id'])->order("id ASC")->limit(1)->select();
  13. $temp1 = explode("-" , $res[0]["date"]);
  14. $res[0]["year"] = $temp1[0];
  15. $res[0]["month"] = $temp1[1];

Call Stack

  1. in Index.php line 530
  2. at Error::appError(8, 'Undefined index: id', '/phpstudy/www/TP5/ap...', 530, ['M' => ['TBname' => 'new_inform', 'type' => '5']]) in Index.php line 530
  3. at Index->show2()
  4. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  5. at App::invokeMethod([object(Index), 'show2'], []) in App.php line 611
  6. at App::module(['index', 'index', 'show2'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 457
  7. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'show2']], ['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('/phpstudy/www/TP5/th...') in index.php line 8

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

REDIRECT_STATUS
200
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
www.sdrcxh.com
PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin
LD_LIBRARY_PATH
/phpstudy/server/httpd/lib
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache/2.4.7 (Unix) PHP/5.5.10
SERVER_NAME
www.sdrcxh.com
SERVER_ADDR
172.17.55.12
SERVER_PORT
80
REMOTE_ADDR
52.207.218.95
DOCUMENT_ROOT
/phpstudy/www/TP5/public/
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/phpstudy/www/TP5/public/
SERVER_ADMIN
you@example.com
SCRIPT_FILENAME
/phpstudy/www/TP5/public/index.php
REMOTE_PORT
32824
REDIRECT_URL
/index/index/show2/TBname/new_inform/type/5.html
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/index/index/show2/TBname/new_inform/type/5.html
SCRIPT_NAME
/index.php
PATH_INFO
/index/index/show2/TBname/new_inform/type/5.html
PATH_TRANSLATED
redirect:/index.php/index/index/show2/TBname/new_inform/type/5.html/index/show2/TBname/new_inform/type/5.html
PHP_SELF
/index.php/index/index/show2/TBname/new_inform/type/5.html
REQUEST_TIME_FLOAT
1711643259.46
REQUEST_TIME
1711643259
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/phpstudy/www/TP5/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711643259.4607
THINK_START_MEM
256328
EXT
.php
DS
/
THINK_PATH
/phpstudy/www/TP5/thinkphp/
LIB_PATH
/phpstudy/www/TP5/thinkphp/library/
CORE_PATH
/phpstudy/www/TP5/thinkphp/library/think/
TRAIT_PATH
/phpstudy/www/TP5/thinkphp/library/traits/
ROOT_PATH
/phpstudy/www/TP5/
EXTEND_PATH
/phpstudy/www/TP5/extend/
VENDOR_PATH
/phpstudy/www/TP5/vendor/
RUNTIME_PATH
/phpstudy/www/TP5/runtime/
LOG_PATH
/phpstudy/www/TP5/runtime/log/
CACHE_PATH
/phpstudy/www/TP5/runtime/cache/
TEMP_PATH
/phpstudy/www/TP5/runtime/temp/
CONF_PATH
/phpstudy/www/TP5/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
SITE_NAME
SITE_URL
http://www.sdrcxh.com