[8] ErrorException in News.php line 224

未定义数组索引: id

  1. $base = model('newbase')->base('4','2','0');
  2. $this->assign('seo', $base['seo']);
  3. $this->assign('plug', $base['swt']);
  4. $this->assign('basic', $base['tel']);
  5. return $this->fetch();
  6. }
  7. //获取关键词搜索列表
  8. public function getNewsResult($request)
  9. {
  10. $id = $request['id'];
  11. $pageSize = '10';
  12. //搜索所有含有关键词id的资讯id
  13. $newsData = db('newnews')->field('id,keywords,title,push_time,look_num,old,image,content,description')->where("is_del='0' and type!='9' and type!='2' and is_show='1' and find_in_set('$id',keywords)")->order('push_time', 'DESC')->paginate($pageSize,false,[
  14. 'path'=>'/index/news/article_result/id/'.$id.'/page/[PAGE].html#test',
  15. ]);
  16. $newsList = $newsData->toArray();
  17. $result = model('newbase')->getNewsData($newsList['data']);
  18. $result = ['id' => $id, 'newsList' => $result,'newsData'=>$newsData];
  19. return $result;

Call Stack

  1. in News.php line 224
  2. at Error::appError(8, 'Undefined index: id', '/www/wwwroot/phouse....', 224, ['request' => ['type' => '100']]) in News.php line 224
  3. at News->getNewsResult(['type' => '100']) in News.php line 197
  4. at News->article_result()
  5. at ReflectionMethod->invokeArgs(object(News), []) in App.php line 343
  6. at App::invokeMethod([object(News), 'article_result'], []) in App.php line 620
  7. at App::module(['index', 'news', 'article_result'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  8. at App::exec(['type' => 'module', 'module' => ['index', 'news', 'article_result']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  9. at App::run() in start.php line 19
  10. at require('/www/wwwroot/phouse....') in index.php line 24

Environment Variables

GET Data

type
100
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
SCRIPT_NAME
/index.php
REQUEST_URI
/index/news/article_result.html?type=100
QUERY_STRING
s=/index/news/article_result.html&type=100
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/2.0
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_QUERY_STRING
s=/index/news/article_result.html&type=100
REDIRECT_URL
/index/news/article_result.html
REMOTE_PORT
51512
SCRIPT_FILENAME
/www/wwwroot/phouse.fanggecn.com/public/index.php
SERVER_ADMIN
webmasterexample.com
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/phouse.fanggecn.com/public
CONTEXT_PREFIX
REQUEST_SCHEME
https
DOCUMENT_ROOT
/www/wwwroot/phouse.fanggecn.com/public
REMOTE_ADDR
52.90.50.252
SERVER_PORT
443
SERVER_ADDR
172.22.224.219
SERVER_NAME
www.fanggecn.com
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
<address>Apache Server at www.fanggecn.com Port 443</address>
LD_LIBRARY_PATH
/www/server/apache/lib
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_HOST
www.fanggecn.com
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
proxy-nokeepalive
1
H2_STREAM_TAG
709-3
H2_STREAM_ID
3
H2_PUSHED_ON
H2_PUSHED
H2_PUSH
off
H2PUSH
off
HTTP2
on
SSL_TLS_SNI
www.fanggecn.com
HTTPS
on
SCRIPT_URI
https://www.fanggecn.com/index/news/article_result.html
SCRIPT_URL
/index/news/article_result.html
REDIRECT_STATUS
200
REDIRECT_H2_STREAM_TAG
709-3
REDIRECT_H2_STREAM_ID
3
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSH
off
REDIRECT_H2PUSH
off
REDIRECT_HTTP2
on
REDIRECT_SSL_TLS_SNI
www.fanggecn.com
REDIRECT_HTTPS
on
REDIRECT_SCRIPT_URI
https://www.fanggecn.com/index/news/article_result.html
REDIRECT_SCRIPT_URL
/index/news/article_result.html
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711619010.3934
REQUEST_TIME
1711619010
PATH_INFO
/index/news/article_result.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/phouse.fanggecn.com/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711619010.3938
THINK_START_MEM
405192
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/phouse.fanggecn.com/thinkphp/
LIB_PATH
/www/wwwroot/phouse.fanggecn.com/thinkphp/library/
CORE_PATH
/www/wwwroot/phouse.fanggecn.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/phouse.fanggecn.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/phouse.fanggecn.com/
EXTEND_PATH
/www/wwwroot/phouse.fanggecn.com/extend/
VENDOR_PATH
/www/wwwroot/phouse.fanggecn.com/vendor/
RUNTIME_PATH
/www/wwwroot/phouse.fanggecn.com/runtime/
LOG_PATH
/www/wwwroot/phouse.fanggecn.com/runtime/log/
CACHE_PATH
/www/wwwroot/phouse.fanggecn.com/runtime/cache/
TEMP_PATH
/www/wwwroot/phouse.fanggecn.com/runtime/temp/
CONF_PATH
/www/wwwroot/phouse.fanggecn.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
HOUSESERVER
https://newhouse.fanggecn.com
PHONESERVER
https://message.fanggecn.com
APPKEY
Tp0nDfm6x9ZlF1yevLrBP3XkSabs2tCqRKgiEcN8QVoIMH7jGW
APPSECRET
G1tdTF96BuYh0aMEVOyXLeUmiwxZ4l3RDJ8QnAgHvqfWpjSNIo
TID
2
TEL
400-400
TELS
400-000-9012
ADMINIMAGE
https://admin.fanggecn.com
PITAYA
https://image.fanggecn.com