What is the best way to password protect folder/page using php without a db or username

后端 未结 5 1039
温柔的废话
温柔的废话 2020-11-28 04:29

What is the best way to password protect folder using php without a database or user name but using. Basically I have a page that will list contacts for organization and ne

5条回答
  •  没有蜡笔的小新
    2020-11-28 05:13

    You could use something like this:

    //access.php
    
    
    
    Login
      
        

    You need to login

    Password:

    Then on each file you want to protect, put at the top:

    
    secret text
    

    It isn't a very nice solution, but it might do what you want

    Edit

    You could add a logout.php page like:

    
    You have logged out   
    

提交回复
热议问题