您好我是VB6新手,我想实现这一点:当用户登录时,他输入他的名字和密码,我应该把它写在一个文件中。文件写回车和选项卡
这里的文件“authentification.txt”:它的用户名密码
bill hope
jessica 1234567
jhon 7654321
以下形式的代码:
Open "c:\authentification.txt" For Binary As #1
x = txtidentifiant.Text
y = txtmotdepasse.Text
Do While Not EOF(1)
Line Input #1, l
If l <> " " Then
Put 1, i, x & vbNewLine
Put 1, i + 1, y & vbNewLine
Else
//here i want to implement a carriage return in the file #1
End If
Loop
我的问题是:如果充满像这样的文件: bhope
它只写第一行
注意,你应该考虑的问题都存储用户名和密码 – 2013-03-27 11:03:49
的'做,当Not'是混淆负逻辑更安全的方法。 '直到'看起来更清晰。 – Bob77 2013-03-27 17:51:48