[8] ErrorException in News.php line 122

未定义变量: id

  1. $this->assign('id',$id);
  2. return $this->fetch('news/view');
  3. }
  4. public function lst()
  5. {
  6. $cid = (int)input('cid');
  7. $pages = (int)input('pages'); //页码
  8. if($pages != ''){
  9. if (!is_numeric($id)){
  10. echo "暂无此数据";
  11. exit;
  12. }
  13. }
  14. if (!is_numeric($cid)){
  15. echo "暂无此数据";
  16. exit;
  17. }
  18. if(empty($cid) or $cid =="0")

Call Stack

  1. in News.php line 122
  2. at Error::appError(8, 'Undefined variable: ...', '/home/wwwroot/defaul...', 122, ['cid' => 9, 'pages' => 3]) in News.php line 122
  3. at News->lst()
  4. at ReflectionMethod->invokeArgs(object(News), []) in App.php line 343
  5. at App::invokeMethod([object(News), 'lst'], []) in App.php line 611
  6. at App::module(['index', 'news', 'lst'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['index', 'news', 'lst']], ['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('/home/wwwroot/defaul...') in index.php line 71

Environment Variables

GET Data

pages
3
cid
9
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
emsc.org.cn
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
/index/news/lst.html
PHP_ADMIN_VALUE
open_basedir=/home/wwwroot/default/:/home/wwwroot/xiehui/:/home/wwwroot/yzf/:/tmp/:/proc/
REDIRECT_STATUS
200
SERVER_NAME
www.emsc.org.cn
SERVER_PORT
80
SERVER_ADDR
172.17.211.106
REMOTE_PORT
46860
REMOTE_ADDR
3.80.211.101
SERVER_SOFTWARE
nginx/1.14.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/home/wwwroot/default/public
DOCUMENT_URI
/index.php
REQUEST_URI
/index/news/lst.html?pages=3&cid=9
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
pages=3&cid=9
SCRIPT_FILENAME
/home/wwwroot/default/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php/index/news/lst.html
REQUEST_TIME_FLOAT
1711658290.2521
REQUEST_TIME
1711658290
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/wwwroot/default/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711658290.2525
THINK_START_MEM
407096
EXT
.php
DS
/
THINK_PATH
/home/wwwroot/default/thinkphp/
LIB_PATH
/home/wwwroot/default/thinkphp/library/
CORE_PATH
/home/wwwroot/default/thinkphp/library/think/
TRAIT_PATH
/home/wwwroot/default/thinkphp/library/traits/
ROOT_PATH
/home/wwwroot/default/
EXTEND_PATH
/home/wwwroot/default/extend/
VENDOR_PATH
/home/wwwroot/default/vendor/
RUNTIME_PATH
/home/wwwroot/default/runtime/
LOG_PATH
/home/wwwroot/default/runtime/log/
CACHE_PATH
/home/wwwroot/default/runtime/cache/
TEMP_PATH
/home/wwwroot/default/runtime/temp/
CONF_PATH
/home/wwwroot/default/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false