开发者

How do I get these two values in asp?

开发者 https://www.devze.com 2023-03-29 01:47 出处:网络
How I can read two values, one line in the txt file? v开发者_运维问答alue1 , value2 set nesne = Server.CreateObject(\"Scripting.FileSystemObject\")

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消