donglu9445 2010-12-20 04:45
浏览 11
已采纳

PHP用户名/密码安全性

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. i.e.

$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.

Thanks

  • 写回答

2条回答 默认 最新

  • dongli8466 2010-12-20 04:47
    关注

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?