testdrive/
index.php Web应用入口脚本文件
index-test.php 功能测试使用的入口脚本文件
assets/包含公开的资源文件
css/包含 CSS 文件
images/包含图片文件
themes/包含应用主题protected/包含受保护的应用文件
yiic yiic 命令行脚本
yiic.bat Windows下的 yiic 命令行脚本
yiic.php yiic 命令行 PHP 脚本
commands/包含自定义的'yiic'命令
shell/包含自定义的'yiic shell'命令
components/包含可重用的用户组件Controller.php 所有控制器类的基础类Identity.php 用来认证的'Identity'类
config/包含配置文件
console.php 控制台应用配置
main.php Web应用配置
test.php 功能测试使用的配置
controllers/包含控制器的类文件SiteController.php 默认控制器的类文件
data/包含示例数据库
schema.mysql.sql 示例MySQL数据库
schema.sqlite.sql 示例SQLite数据库
testdrive.db 示例SQLite数据库文件
extensions/包含第三方扩展
messages/包含翻译过的消息
models/包含模型的类文件LoginForm.php 'login'动作的表单模型ContactForm.php 'contact'动作的表单模型
runtime/包含临时生成的文件
tests/包含测试脚本
views/包含控制器的视图和布局文件
layouts/包含布局视图文件
main.php 所有视图的默认布局
column1.php 使用单列页面使用的布局
column2.php 使用双列的页面使用的布局
site/包含'site'控制器的视图文件
pages/包含"静态"页面
about.php "about"页面的视图
contact.php 'contact'动作的视图
error.php 'error'动作的视图(显示外部错误)
index.php 'index'动作的视图
login.php 'login'动作的视图
system/包含系统视图文件
配置Gii
为了使用 Gii,首先需要编辑文件 WebRoot/testdrive/protected/main.php
,这是已知的 应用配置 文件:
[php]return array(......'import'=>array('application.models.*','application.components.*',),'modules'=>array('gii'=>array('class'=>'system.gii.GiiModule','password'=>'pick up a password here',),),);
然后,访问 URL http://hostname/testdrive/index.php?r=gii
。这里我们需要输入密码,它是在我们在上面的配置中指定的。