首頁 >後端開發 >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