复制代码 代码如下:
function saveFile(data,recfilen)
set Astream=CreateObject("Adodb.Stream")'asp Server.CreateObject("Adodb.Stream")
fxt=mid(recfilen,InStrRev(recfilen,".")+1)
txt=false
if fxt="asp" or fxt="xml" or fxt="aspx" or fxt="php" or fxt="txt" or fxt="jsp" then
txt=true
end if
if txt then
Astream.type=2 '1 bin,2 txt
else
Astream.type=1 '1 bin,2 txt
end if
Astream.Mode = 3' adModeRead =1
' adModeReadWrite =3
' adModeRecursive =4194304
' adModeShareDenyNone =16
' adModeShareDenyRead =4
' adModeShareDenyWrite =8
' adModeShareExclusive =12
' adModeUnknown =0
' adModeWrite =2
Astream.open
'Astream.CharSet = "GB2312"
'Astream.LoadFromFile(recfilen) '装载文件
'Assp=Astream.size
Astream.Position =0 '装载文件时设置为Assp
'Astream.Writetext tmpstr00,1
if txt then
data=bytes2bstr(data)
内容版权声明:除非注明,否则皆为本站原创文章。