How to secure database passwords in PHP?

后端 未结 16 1247
闹比i
闹比i 2020-11-21 22:41

When a PHP application makes a database connection it of course generally needs to pass a login and password. If I\'m using a single, minimum-permission login for my applica

16条回答
  •  走了就别回头了
    2020-11-21 23:19

    If you're hosting on someone else's server and don't have access outside your webroot, you can always put your password and/or database connection in a file and then lock the file using a .htaccess:

    
    order allow,deny
    deny from all
    
    

提交回复
热议问题