/** * 首页 */ public function actionIndex() { $templateDir = Yii::app()->basePath . '/views'; $fileList = XUtils::getDir($templateDir); foreach ((array) $fileList as $key => $file) { $files[] = array('fileName' => $file, 'subFileList' => XUtils::getFile($templateDir . '/' . $file)); } $data['fileList'] = $files; $this->render('index', $data); }
/** * 首页 */ public function actionIndex() { parent::_acl(); $templateDir = $this->_themePath . DS . 'views' . DS; $fileList = XUtils::getDir($templateDir); foreach ((array) $fileList as $key => $file) { $files[] = array('fileName' => $file, 'subFileList' => XUtils::getFile($templateDir . $file)); } $data['fileList'] = $files; $this->render('index', $data); }