摘要: html 页面 权限组: jquery 代码 $(document).on('change', 'select[name=type]', function(){ $.get('/permission_list', { type: $('select[name=type]').val() }... 阅读全文
posted @ 2017-07-01 14:30 桔子木木 阅读(5426) 评论(0) 推荐(0) 编辑
摘要: 1.order by 按制定值排序 SELECT * FROM USER ORDER BY LOCATE(id,'2,3,1,5,4,6,7,8,9,10,11,12,13,14,15'); 2.where in 排序 Select * FROM table1 Where (ID IN (3,5,1 阅读全文
posted @ 2017-06-29 15:58 桔子木木 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 在开发过程中,有时间需要用 wherehas 联合查询 出想要的结果,但是有的时候想搜索出不在关联表中出现的数据 whereDoesntHave(例:搜索出开卡的用户和没有开卡的用户)if($is_open_card == 1){ $result = $result->whereHas('member_card');}else{ $result = $result->wher... 阅读全文
posted @ 2017-06-29 11:19 桔子木木 阅读(2859) 评论(0) 推荐(0) 编辑
摘要: 操作步骤:https://github.com/Zizaco/entrust/tree/1.0 这篇博客说的蛮详细的:http://blog.boolw.com/?p=241 简化后的步骤 1.在根项目composer.json下require键下添加以下代码(注意:在”laravel/framew 阅读全文
posted @ 2017-05-24 16:20 桔子木木 阅读(494) 评论(0) 推荐(0) 编辑
摘要: 重新配置了PHP环境,要安全PEAR扩展,CMD窗口运行PHP,提示不是内部或者外部命令或者可执行文件,解决方法是把PHP目录加入系统环境变量,不然的话,你只能CD到PHP安装目录下来运行PHP命令。 阅读全文
posted @ 2017-04-08 15:32 桔子木木 阅读(1402) 评论(0) 推荐(0) 编辑
摘要: 解决办法一:不小心在返回的json字符串中返回了BOM头的不可见字符,某些编辑器默认会加上BOM头,如下处理才能正确解析json数据: $info = json_decode(trim($info,chr(239).chr(187).chr(191)),true); 阅读全文
posted @ 2017-03-30 17:23 桔子木木 阅读(2669) 评论(0) 推荐(0) 编辑
摘要: pro ———— 网站根目录 ├─ addons —— 模块安装目录 │ ├─ wdl_shopping — 微商城 │ └─ … — 其他扩展模块 ├─ attachment —- 公共资源及附件 ├─ app ——— 微站功能 ├─ web ——— 后台管理 ├─ data │ ├─ tpl — 阅读全文
posted @ 2017-03-27 10:00 桔子木木 阅读(2919) 评论(0) 推荐(0) 编辑
摘要: public function getFirstCharter($str) { if (empty($str)) { return ''; } $fchar = ord($str{0}); if ($fchar >= ord('A') && $fchar = -20319 && $asc = -202... 阅读全文
posted @ 2017-03-23 11:16 桔子木木 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 1.package.json 2.在 lib 里面新建 sql.js 3.node 引用 mysql 阅读全文
posted @ 2017-03-20 18:16 桔子木木 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 前段时间研究了下微信模板消息:服务通知(开发api: https://mp.weixin.qq.com/debug/wxadoc/dev/api/notice.html) 我在过程中遇到的keng,就是post传的 form_id(前提就是在微信后台已经添加了消息模板) form_id 表单提交场景 阅读全文
posted @ 2017-03-14 12:13 桔子木木 阅读(3371) 评论(0) 推荐(0) 编辑