Secure database passwords in PHP

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  :) 

你可能感兴趣的:(PHP)