首页 > 技术文章 > CI框架错误汇总

942267027wzmblog 2017-01-13 12:10 原文

  2017年1月13日12:09:02

【1】

A PHP Error was encounteredSeverity: NoticeMessage: Undefined variable: aticle_listFilename: xianlu/road.phpLine Number: 35Backtrace:File: lampp/htdocs/application/views/xianlu/road.phpLine: 35Function: _error_handlerFile: lampp/htdocs/application/controllers/Xianlu.phpLine: 52Function: viewFile: lampp/htdocs/index.phpLine: 319Function: require_once

 解决:

  (1)首先,保证控制器里的变量传递到模板:$this->locad->view('视图路径/名称',$data);   检查  变量名 $data  没写错;

         排除第一个原因,第二个解决办法如下:

  (2)参考: https://stackoverflow.com/questions/32492944/a-php-error-was-encountered-severity-notice-message-undefined-offset-0  和  https://github.com/daylightstudio/FUEL-CMS/issues/300

 

推荐阅读