a better approach than storing mysql password in plain text in config file?

前端 未结 8 2060
说谎
说谎 2020-11-29 00:26

It\'s always bothered me that many PHP programs require the user to store the mysql password in plain text (in a string or constant) in a configuration file in the applicati

8条回答
  •  我在风中等你
    2020-11-29 01:09

    You can set enviroment variables in .htaccess file, for example:

    SetEnv DBuser sesame
    SetEnv DBpass street
    

    And later in your code read, use and delete the entries.

提交回复
热议问题