Thinkphp always reports an error when using the redirection Method

Source: Internet
Author: User
This error is reported every time you prepare to redirect back to another method in the same controller. Why? If a system error occurs, you can select [retry] [Return] or [return to the homepage] [error message] to operate the admin {code...} illegally ...} this error is reported every time you prepare to redirect back to another method in the same controller. Why?

System Error
You can select [retry] [Return] or [return to homepage]

[Error message]

Invalid admin Operation

// Implement the student information deletion function public function delete () {$ room = M ('room '); $ room_id = $ _ GET ['room _ id']; $ room-> where ("room_id = $ room_id")-> delete (); echo "script" alert ('deleted successfully') script "; // there is a bug here $ this-> redirect ("showRoom ");}

Reply content:

This error is reported every time you prepare to redirect back to another method in the same controller. Why?

System Error
You can select [retry] [Return] or [return to homepage]

[Error message]

Invalid admin Operation

// Implement the student information deletion function public function delete () {$ room = M ('room '); $ room_id = $ _ GET ['room _ id']; $ room-> where ("room_id = $ room_id")-> delete (); echo "script" alert ('deleted successfully') script "; // there is a bug here $ this-> redirect ("showRoom ");}

Check whether the showRoom method is in the same controller.

'$ This-> redirect ('new/category ');
`
Controller name and Operation Method

Why not I am prompted to operate the showRoom illegally. It seems that the admin method is targeted to the showRoom, but the admin method is not found.

Your redict only specifies the method, not the Controller

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.