随笔分类 -  Yii2

Yii2
摘要:1、查询 2、新增 3、修改 4、删除 阅读全文
posted @ 2017-07-14 11:31 L狗哥 阅读(909) 评论(0) 推荐(0)
摘要:1、在 assets/AppAsset 里定义方法 2、在view里调用 阅读全文
posted @ 2017-07-14 11:23 L狗哥 阅读(2389) 评论(0) 推荐(0)
摘要:1. enablePrettyUrl yii2默认不支持类似 http://<domain>/site/error 的url格式,需要在config.php中启用 enablePrettyUrl 属性 2. 配置suffix 实现伪静态 *.html 需要在 config.php中配置 urlMan 阅读全文
posted @ 2017-07-13 11:52 L狗哥 阅读(1207) 评论(0) 推荐(0)
摘要:访问地址: http://localhost/yii2-test/web/index.php?r=gii 如果你通过本机以外的机器访问 Gii,请求会被出于安全原因拒绝。 在web.php修改gii配置: 之后就可生成对应的模块代码了 生成controller: 访问地址: http://local 阅读全文
posted @ 2017-07-12 17:22 L狗哥 阅读(654) 评论(0) 推荐(0)
摘要:需要 Composer , 安装教程点此处 1、安装基础版: 2、安装高级版: 基础模板和高级模板的区别: 基础版:只包括了一个web站点, 目录结构如下 高级版:分前,后两个站点,目录结构如下 访问:http://localhost/yii2-test/web/index.php 安装成功 阅读全文
posted @ 2017-07-12 16:50 L狗哥 阅读(225) 评论(0) 推荐(0)