[8] ErrorException in Banquan.php line 22

未定义变量: id

  1. {
  2. $currentUrl = $_SERVER["QUERY_STRING"];
  3. $result = getClassid($currentUrl);
  4. foreach ($result as $value) {
  5. $classname = $value['title'];
  6. $id = $value['id'];
  7. }
  8. // 文章分页
  9. $cultureList = Db::name('article')->where(['status' =>1, 'classid' => $id])->paginate(10);
  10. $this->assign('cultureList',$cultureList);
  11. return $this->fetch('index',[
  12. 'classname' => $classname,
  13. ]);
  14. }
  15. /**
  16. * [detail description]版权知识详情页
  17. * @return array $class 所属栏目信息

Call Stack

  1. in Banquan.php line 22
  2. at Error::appError(8, 'Undefined variable: ...', '/alidata/www/stock/a...', 22, ['currentUrl' => 's=index/banquan/inde...', 'result' => []]) in Banquan.php line 22
  3. at Banquan->index()
  4. at ReflectionMethod->invokeArgs(object(Banquan), []) in App.php line 234
  5. at App::invokeMethod([object(Banquan), 'index'], []) in App.php line 401
  6. at App::module(['index', 'banquan', 'index'], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 140
  7. at App::run() in start.php line 18
  8. at require('/alidata/www/stock/t...') in index.php line 24

Exception Datas

Error Context
currentUrl s=index/banquan/index/news/newsdetail&classid=33&id=168
result [ ]

Environment Variables

GET Data
classid 33
id 168
POST Dataempty
Filesempty
Cookies
PHPSESSID 5f994oem100lnhqf2kgiq2bms2
Sessionempty
Server/Request Data
REDIRECT_STATUS 200
HTTP_HOST www.zyddcm.com
HTTP_USER_AGENT Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
HTTP_ACCEPT */*
HTTP_COOKIE PHPSESSID=5f994oem100lnhqf2kgiq2bms2
HTTP_ACCEPT_CHARSET utf-8
CONTENT_LENGTH 0
CONTENT_TYPE application/x-www-form-urlencoded
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
LD_LIBRARY_PATH /alidata/server/httpd/lib
SERVER_SIGNATURE
SERVER_SOFTWARE Apache/2.4.2 (Unix) PHP/5.5.7
SERVER_NAME www.zyddcm.com
SERVER_ADDR 10.100.10.9
SERVER_PORT 80
REMOTE_ADDR 147.78.152.18
DOCUMENT_ROOT /alidata/www/stock
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /alidata/www/stock
SERVER_ADMIN you@example.com
SCRIPT_FILENAME /alidata/www/stock/index.php
REMOTE_PORT 50584
REDIRECT_QUERY_STRING s=index/banquan/index/news/newsdetail&classid=33&id=168
REDIRECT_URL /index/banquan/index/news/newsdetail
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING s=index/banquan/index/news/newsdetail&classid=33&id=168
REQUEST_URI //index/banquan/index/news/newsdetail?classid=33&id=168
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1606566245.324
REQUEST_TIME 1606566245
PATH_INFO index/banquan/index/news/newsdetail
Environment Variablesempty
ThinkPHP Constants
APP_PATH /alidata/www/stock/application/
APP_DEBUG true
THINK_VERSION 5.0.4
THINK_START_TIME 1606566245.3246
THINK_START_MEM 233480
EXT .php
DS /
THINK_PATH /alidata/www/stock/thinkphp/
LIB_PATH /alidata/www/stock/thinkphp/library/
CORE_PATH /alidata/www/stock/thinkphp/library/think/
TRAIT_PATH /alidata/www/stock/thinkphp/library/traits/
ROOT_PATH /alidata/www/stock/
EXTEND_PATH /alidata/www/stock/extend/
VENDOR_PATH /alidata/www/stock/vendor/
RUNTIME_PATH /alidata/www/stock/runtime/
LOG_PATH /alidata/www/stock/runtime/log/
CACHE_PATH /alidata/www/stock/runtime/cache/
TEMP_PATH /alidata/www/stock/runtime/temp/
CONF_PATH /alidata/www/stock/application/
CONF_EXT .php
ENV_PREFIX PHP_
IS_CLI false
IS_WIN false