问题描述
亲爱的朋友,
我正在使用MySQL数据库在PHP中开发一个网站.
当我连接到MySQL数据库时,我需要提供用户名和密码.
我想知道该密码和用户名应该存储在哪里,以便当我需要提供用户名和密码时,可以从该位置检索它.
我想保护我的用户名和密码.
Dear Friends,
I am developing a website in PHP using MySQL Database.
When I connect to MySQL database, I need to give the username and password.
I want to know that where should I store this password and username, so that when I need to give the username and password, I retrieve it from that place.
I want to secure my username and password.
推荐答案
<?php require_once("connection.php")<br mode="hold" /?>
您可以利用
You can make use of
<?php include("connection.php")<br mode="hold" /?>
也是,但这可能会由于连接错误太多而出错.
由于无法以txt模式从浏览器读取脚本,因此您也不必担心安全性问题.
BR//
Harsha
too but this might error out some time with Too many connection error.
As the scripts are not readable from the browser in txt mode you don''t have to worry about the security issues too.
BR//
Harsha
这篇关于哪里存储mysql用户名和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!