Thinkphp3.2.1-php Tutorial

Source: Internet
Author: User
Thinkphp3.2.1 I have created a new admin folder in the background of my website. how can I set permissions for all pages in the admin file? I need to log on to the account and password to log on.


Reply to discussion (solution)

This problem is quite basic. it actually involves the function of adding permission verification for all php
Let me first talk about the implementation principle:
1. access the account and password on the specified page
2. after the background receives the data passed through the form, it compares it with the database data.
3. if the account password is correct, set the cookie or session
4. jump to the background page. at this time, all other pages will execute a public permission verification code, which reads the cookie or session set during login, determine whether the user is logged on. If yes, continue to execute. If no, exit and exit.

We recommend that you check the permission management of tp.

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.