yii学习笔记--使用gii快速创建控制器和模型

配置gii

1 'gii'=>array(
2             'class'=>'system.gii.GiiModule',
3             'password'=>'123456',//使用gii的密码
4             // If removed, Gii defaults to localhost only. Edit carefully to taste.
5             'ipFilters'=>array('127.0.0.1','::1'),//ip
6         ),
7         
8     ),

在浏览器中输入项目的路径

http://127.0.0.1/index.php?r=gii/

在下面的页面输入自己刚设置的密码

出现以下页面

    Controller Generator控制器生成
    Crud Generator curd 生成
    Form Generator 表单生成
    Model Generator 模型生成
    Module Generator 模块生成

点击Model Generator 模型生成

我用的是ecshop的数据库 做测试的

点击preview  完成后 点击genterat 生成文件

  点击Controller Generator控制器生成

点击CURD 生成

一切生成完后

访问http://127.0.0.1/index.php?r=goods

即可看到一个简单的商品管理后台就生成了

转载于:https://www.cnblogs.com/tl542475736/p/3950447.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值