Secure a SMTP password in PHP

后端 未结 2 705
你的背包
你的背包 2021-01-16 12:42

I\'m going to use the phpmailer class in my WordPress-plugin to support the use of SMTP in my e-mail function. Is it safe to store the password in the PHP code? I don\'t fee

2条回答
  •  半阙折子戏
    2021-01-16 13:26

    Tons of sites store passwords inside PHP source code. If a password is stored inside tags, it can be considered secure.

    PHP source code is rendered by the PHP engine before being exposed, which is a necessary security component. There is no known way to read it, unless your site itself has security vulnerabilities.

    Sources:

    Possible to view PHP code of a website?

    http://www.webmasterworld.com/forum88/10926.html

    Read source code with PHP

    http://www.vodahost.com/vodatalk/mysql-php/15061-php-source-code-php-files.html

提交回复
热议问题