How to set password on php page

藏色散人
Release: 2023-03-11 16:04:02
Original
3394 people have browsed it

How to set the password on the php page: First create a recheck.php file; then include the php file at the front of the page where you need to set an independent access password.

How to set password on php page

The operating environment of this article: Windows7 system, PHP7.1 version, DELL G3 computer

How to set the password on the php page?

Set an independent access password for the PHP page (page encryption)

Set an independent access password for some PHP pages. If the password is incorrect, you will not be able to view the content, which is equivalent to deleting the page. an encryption. Just include the following php file at the front of where you need to set the independent access password.

recheck.php


   
    
  title
  



        
请输入独立访问密码: (密码:123456)
'); } ?>
Copy after login

Just include this php file in the page where you need to set an independent password for access. This will ensure that you can only access the specified page after entering the correct access password; You can also modify it slightly and encapsulate it into a function and insert it directly into the top of the page where the access password needs to be set, so that you can set a different access password for each page!

Copy after login

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to set password on php page. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!