麻辣家族討論版版's Archiver

laigs218 發表於 2021-7-20 15:37

ASP 讀取 TXT 文字檔

<html>

<head>
<title></title>
</head>

<body>
<%
Set fs = CreateObject("Scripting.FileSystemObject")
Set ts = fs.OpenTextFile ("c:\MyText.txt")
'只會讀取第一行的資料
Do While ts.AtEndOfLine <> True
   Response.write ts.Read(1)
   ts.skip(1)
Loop
ts.Close
%>
</body>
</html>

頁: [1]

麻辣家族討論版版為 麻辣學園 網站成員  由 昱得資訊工作室 © Since 1993 所提供