站点目录是:/home/eboss/webroot/appxin
1.创建站点应用
cd /home/eboss/webroot/appxin/framework
./yiic webapp ../
2.分模块创建应用
cd /home/eboss/webroot/appxin/protected
./yiic shell main/config.php
eboss@eboss:~/webroot/appxin/protected$ ./yiic shell config/main.php
Yii Interactive Tool v1.1 (based on Yii v1.1.14)
Please type 'help' for help. Type 'exit' to quit.
>> help
At the prompt, you may enter a PHP statement or one of the following commands:
- controller
- crud
- form
- help
- model
- module
Type 'help <command-name>' for details about a command.
To expand the above command list, place your command class files
under 'protected/commands/shell', or a directory specified
by the 'YIIC_SHELL_COMMAND_PATH' environment variable. The command class
must extend from CConsoleCommand.
>> module wap
mkdir /home/eboss/webroot/appxin/1/protected/modules
mkdir /home/eboss/webroot/appxin/1/protected/modules/wap
mkdir /home/eboss/webroot/appxin/1/protected/modules/wap/views
mkdir /home/eboss/webroot/appxin/1/protected/modules/wap/views/default
generate views/default/index.php
mkdir /home/eboss/webroot/appxin/1/protected/modules/wap/controllers
generate controllers/DefaultController.php
generate WapModule.php
Module 'wap' has been created under the following folder:
/home/eboss/webroot/appxin/1/protected/modules/wap
You may access it in the browser using the following URL:
http://hostname/path/to/index.php?r=wap
Note, the module needs to be installed first by adding 'wap'
to the 'modules' property in the application configuration.