How to safely store a password inside PHP code?

前端 未结 11 1910
轮回少年
轮回少年 2020-12-11 04:12

How can I have a password inside PHP code and guarantee that no one viewing the page in the browser can retrieve it?

Is:

11条回答
  •  庸人自扰
    2020-12-11 04:34

    There are noumerous ways of doing this. However, people will not be able to view the password you stored (as plain text) in a PHP file, since PHP is a server side language which means that, as long as you don't print it out to the browser, it will remain invisible.

    So it's 'safe'.

提交回复
热议问题