gii的命令行用法

04-05

gii在web下的用法就不提了,照着网页的说明操作就行了。

命令行下用gii可能会更方便快捷。

  • 生成模型:
php yii gii/model --ns=common\\models --tableName=hehe --modelClass=Hehe
  • 生成crud
php yii gii/crud --modelClass=common\\models\\Hehe --controllerClass=backend\\controllers\\HeheController --viewPath=@backend/views/hehe

...其他几种LZ不太常用就不写了,生成的时候都会出confirm信息,如果不需要的话可以加上--interactive=0参数。hehe需要替换成你实际的表名、模型名等。

有网页为什么还要用命令行?快的太多了好不好!!!!