SoFunction
Updated on 2025-04-14

FSO reads out TXT file

<!--#include file=""-->
<%
function ReadFile(filename)
on error resume next

'A method of error correction in ASP
Const ForReading = 2
Const Create = false
Dim FSO
DIM TS
DIM filepath
DIM thefile
Dim content

'-----------------------------------------------------------------------------------------------------------------------------

Set FSO=("")
filepath=("temp") ./Folder stored in the record book

if <>0 then
"The directory does not exist"

end if

'filename="" --------------------------------------------------------------------------------------------------------------------------
thefile=filepath&"/"&filename
Set TS = (thefile,1)

do until
(""&&"")
("<br>")
loop

Set TS = Nothing
Set FSO = Nothing
end function
%>

<%
dim id
dim filename
id=6
Set rs=("")
sql="select * from yuan where fileload")
%>

<% readfile(filename) %>