How to secure database passwords in PHP?

后端 未结 16 1211
闹比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:15

    Put the database password in a file, make it read-only to the user serving the files.

    Unless you have some means of only allowing the php server process to access the database, this is pretty much all you can do.

提交回复
热议问题