Home >Backend Development >PHP Tutorial >Secure database passwords in PHP

Secure database passwords in PHP

WBOY
WBOYOriginal
2016-06-23 13:15:47773browse

Method 1 - modify apache conf or .htaccess

    <files db.php>    order allow,deny    deny from all    </files>

Method 2 - Store them in a file outside web root.    

e.g: include('../private/db.php')

Better approach is Method 1 + 2  :) 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn