YII linux 下用命令创建应用及分模块创建应用

站点目录是:/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.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值