Password protection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Exequiel
    Contributor
    • Jul 2012
    • 288

    Password protection

    Hi, is there a way to password protect a directory in PHP?
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    yes and no. since directory access usually happens without the participation of PHP, a native implementation is pointless. So you have to protect the directory through means of the systems involved. that is the web server (e.g. Apache) for HTTP access (via internet) or the File System (the OS) for any type of access.

    for Apache you could just set up the appropriate access rights (there is an extensive article on authentication).

    Comment

    Working...