最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
thinkphp rbac实例的bug分析
时间:2022-06-25 02:32:51 编辑:袖梨 来源:一聚教程网
1.Thinkphp的Action输出的JSON在IE中提示下载
在ThinkphplibcoreAction.class.php中 将两处 “header(‘Content-Type:application/json; charset=utf-8′);” 修改为 “header(‘Content-Type:text/html; charset=utf-8′);”
2.Prototype无法取得form中的提交控件
具体表现为 Form.serialize方法返回为空,无法send
// 发送表单Ajax操作,暂时不支持附件上传
| 代码如下 | 复制代码 |
| sendForm: function(formId, url, response, target, tips, effect){vars = Form.serialize(formId); this.send(url, vars, response, target, tips, effect);} //www.111com.net |
|
其原因时form和内部input不能嵌套在table表格中。
在Thinkphp的rbac中是有不少错误的,有个就是上述的原因。在PublicTpluseredit.html中form就嵌套在table中了。
还有个问题是,重置密码的input没有指定reserPWD的id。
3.sendForm is not defined
| 代码如下 | 复制代码 |
|
class="small submit"> //www.111cn.Net Uncaught ReferenceError: sendForm is not defined |
|
其错误是因为sendForm方法的调用需要引入 ThinkAjax,变成ThinkAjax.sendForm
4.rbac分页无法跳转,?&=2 没有键
需要在config.php中添加 ‘VAR_PAGE’=>’p’
相关文章
- 新三国志曹操传马超无双试炼四通关攻略 12-15
- 俄罗斯YANDEX引擎官网入口-免登录直达Yandex首页 12-15
- 漫蛙ManWa在线免费阅读入口_漫蛙ManWa官方网页版一键直达 12-15
- 逃离鸭科夫仓库区地窖在哪 仓库区地窖入口位置详情 12-15
- 光与影33号远征队熙艾尔bd玩法:熙艾尔毕业装备与加点思路介绍 12-15
- 漫蛙网页版免费入口进不去-漫蛙网页版最新免费版一键直达 12-15