[8] ErrorException in Project.php line 548

未定义数组索引: name

  1. ->field('p.id,n.name,p.comestudent')
  2. ->find();
  3. // $navigations['comestudent'] = nl2br($navigations['comestudent']) ;
  4. // dump($navigations) ;die();
  5. $array = explode("\n", $navigations['comestudent']) ;
  6. $navigations['comestudent'] = implode('',array_map(function($v){
  7. return '<p>'. $v . '</p>';
  8. },$array));
  9. $this->view->assign('banner',$this->banner('首页')) ;
  10. $this->view->assign('SiteTitle',$navigations['name']) ;
  11. $this->view->assign('data',$navigations) ;
  12. return $this->view->fetch() ;
  13. }
  14. public function projectchannel(){
  15. $id = $this->request->param('id') ;
  16. if (empty($id)){
  17. $this->err() ;
  18. }
  19. $navigat = Db::name('navigation')->where(['status' => 'normal' , 'pid' => 3 ])->field('id,name,remark')->select() ;

Call Stack

  1. in Project.php line 548
  2. at Error::appError(8, 'Undefined index: nam...', '/www/wwwroot/xueyuan...', 548, ['id' => '4', 'navigations' => ['comestudent' => '<p></p>'], 'array' => ['']]) in Project.php line 548
  3. at Project->comestudentext()
  4. at ReflectionMethod->invokeArgs(object(Project), []) in App.php line 343
  5. at App::invokeMethod([object(Project), 'comestudentext'], []) in App.php line 611
  6. at App::module(['index', 'project', 'comestudentext'], ['app_host' => '', 'app_debug' => '1', 'app_trace' => '', ...], true) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['index', 'project', 'comestudentext']], ['app_host' => '', 'app_debug' => '1', 'app_trace' => '', ...]) in App.php line 139
  8. at App::run() in index.php line 50

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
xueyuan.dev.sdyingfeng.cn
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
/project/comestudentext/id/4.html
REDIRECT_STATUS
200
SERVER_NAME
xueyuan.dev.sdyingfeng.cn
SERVER_PORT
80
SERVER_ADDR
172.23.230.156
REMOTE_PORT
56056
REMOTE_ADDR
44.200.77.59
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/public
DOCUMENT_URI
/index.php
REQUEST_URI
/project/comestudentext/id/4.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/project/comestudentext/id/4.html
SCRIPT_FILENAME
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711652676.5589
REQUEST_TIME
1711652676
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711652676.5594
THINK_START_MEM
417768
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/thinkphp/
LIB_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/
EXTEND_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/extend/
VENDOR_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/vendor/
RUNTIME_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/runtime/
LOG_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/runtime/log/
CACHE_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/runtime/temp/
CONF_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
ADDON_PATH
/www/wwwroot/xueyuan.dev.sdyingfeng.cn/addons/