以下是引用片段: Function ReadFromTextFile(FileUrl,CharSet) dim str set stm=server.CreateObject("adodb.stream") stm.Type=2 stm.mode=3 stm.charset=CharSet stm.open stm.loadfromfile server.MapPath(FileUrl) str=stm.readtext stm.Close set stm=nothing ReadFromTextFile=str End Function str=ReadFromTextFile("test.htm","utf-8") |
时间: 2025-01-03 07:42:56