How I can read two values, one line in the txt file?
v开发者_运维问答alue1 , value2
set nesne = Server.CreateObject("Scripting.FileSystemObject")
Response.Write "Son 10 Kayıt<br/>"
Const nLines = 10
set AO = nesne.OpenTextFile(Server.MapPath("log.txt"),8)
NumberOfRecords = AO.Line - 1
AO.Close
set AO = nesne.OpenTextFile(Server.MapPath("log.txt"),1)
For j = 1 To NumberOfRecords - nLines
s = AO.SkipLine
Next
'You could put the rest into an Array
'v = Split((f.readall), vbLf)
For j = 1 To nLines
Response.Write AO.ReadLine
Response.Write "<br/>"
Next
AO.Close
You can use:
arrayVariable = Split(strLine,",")
This will take whatever is in strLine (which should be the line you just read in) and save it to an array (arrayVariable) using ',' as a delimiter.
精彩评论