首页 >后端开发 >php教程 >Secure database passwords in PHP

Secure database passwords in PHP

WBOY
WBOY原创
2016-06-23 13:15:47773浏览

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

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn