最新下载
热门教程
- 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-13
- 海棠文学城网页版官网入口-2025在线网址直达 12-13
- 土豪漫画官方APP免费下载入口-正版无广告畅读保障 12-13
- 歪歪漫画app最新版下载入口-首页畅读无广告直接进 12-13
- SkrBT磁力官网最新入口-skrbt磁力引擎极速版入口 12-13
- 微博热搜网页版极速入口-微博热搜榜官方直达链接 12-13