[英]PHP Username/Password Security
I'm creating a login script for a website I'm developing. 我正在为正在开发的网站创建登录脚本。 At the moment I have the usernames and passwords hard-coded into the script.
目前,我已经将用户名和密码硬编码到了脚本中。 ie
即
$usersAndPasses = array(
'username1' => 'password1',
'username2' => 'password2'
)
and so on 等等
I was wondering if this is any less secure than placing them in a MySQL database. 我想知道这是否比将它们放在MySQL数据库中更不安全。
Thanks 谢谢
不会。它的安全性同样要好,除非有人窃取了您的资源。
Not less secure ... unless of course there is file injection. 不少安全...当然,除非有文件注入。 However, it will also be a lot slower than querying the database if you have lots of members (which you would currently have to add in manually).
然而,它也将会比查询数据库,如果你有很多成员(你目前必须手动添加)慢了许多 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.