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.