[問題] ASP如何以binary形式讀取資料?
objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objTextStream=objFSO.OpenAsTextFile(FilePath,ForReading,False,0)
For I = 1 To 353 Step 1
StrFileContent=objTextStream.Read(1)
Response.write "I=" & I &":" & Hex(Asc(StrFileContent))
Response.write "<br/>"
Next
我是開啟一個jpeg的檔案
以下是UltraEdit顯示的結果
FF D8 FF E1 01 5D 45 78 69 .....
如果用上面的方法讀的話是
FF 3F 3F 5D 45 78.....
看來這個方法似乎不能正確的一個位元一個位元讀取檔案
不知道要怎樣才能正確的讀取呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.48.176
推
12/07 02:12, , 1F
12/07 02:12, 1F
→
12/07 02:12, , 2F
12/07 02:12, 2F
推
12/13 09:33, , 3F
12/13 09:33, 3F