thinkphp Frame 1 Little questions

Source: Internet
Author: User
thinkphp Framework some small questions
I am using thinkphp, for example, after verifying the user's username, I would like to pop up a window prompt login failure, and then re-display the template

So I'll write that.

echo "";
$this->display (' XXX ');

But this will cause the CSS style of XXX to fail to load, my friend said because there is no output in front of display.
Can you tell us how to solve this situation?
I know I can use $this->success (' OK '), but in addition to the built-in success, is there any way to prevent the display from invalidating the stylesheet? Or is there a way to replace it?
------Solution--------------------
If you do not have to bring your own jump
1. You can split the login method with the login check method. But there is a way.
2. Can return error parameters directly on the page with Ajax call, prompt error

Humble opinion, for reference only
------Solution--------------------
Ditto
The return value can be judged directly on the page Ajax submission.
------Solution--------------------
The template page uses Ajax to commit to PHP's action, based on the display of the HTML (inclusive style) that is controlled by the return value of the action in JS.
------Solution--------------------
Thinkphp has provided this type of dialog box code, you can just call it.
You can use its automatic verification function, do not need to focus on this
If you like to write your own code, don't use thinkphp.
  • 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.