Thinkphp rbac instance bug analysis

Source: Internet
Author: User

1. The JSON output by Thinkphp Action prompts download in IE

In ThinkphplibcoreAction. class. in php, change "header ('content-Type: application/json; charset = utf-8 & prime;);" to "header ('content-Type: text/html; charset = utf-8 & prime ;);"

2. Prototype cannot obtain the submit control in form.
The specific manifestation is that the Form. serialize method returns null and cannot send

// Send the form Ajax operation. Attachments cannot be uploaded at the moment.

The code is as follows: Copy code
SendForm: function (formId, url, response, target, tips, effect) {vars = Form. serialize (formId );
This. send (url, vars, response, target, tips, effect);} // www.111cn.net

The reason is that form and internal input cannot be nested in the table.

There are many errors in rbac of Thinkphp, and one is the reason above. In publictpluseredit.html, the form is nested in the table.
Another problem is that the reserPWD id is not specified in the input for password reset.

3. sendForm is not defined

The code is as follows: Copy code
<Input type = "button" value = "save" onclick = "sendForm ('form1 ','/rbac/User/update /')"
Class = "small submit"> // www.111cn. Net
Uncaught ReferenceError: sendForm is not defined

The error is that ThinkAjax needs to be introduced to call the sendForm method to convert it to ThinkAjax. sendForm.

4. The rbac page cannot be redirected ,? & = 2 no key
You need to add 'Var _ page' => 'P' to config. php'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.