嗨,我是 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
并且它只写第一行