기능:
코드 사본은 다음과 같습니다.
functionsavefile (data, recfilen)
setastream = createobject ( "adodb.stream") 'aspserver.createobject ( "adodb.stream")
fxt = mid (Recfilen, Instrev (Recfilen, ".")+1)
txt = false
iffxt = "asp"orfxt = "xml"orfxt = "aspx"orfxt = "php"orfxt = "txt"orfxt = "jsp"
txt = true
endif
iftxtthen
asstream.type = 2'1bin, 2txt
또 다른
asstream.type = 1'1bin, 2txt
endif
asstream.mode = 3'AdModeRead = 1
'AdmodereadWrite = 3
'Admoderecursive = 4194304
'Admodesharedenynone = 16
'Admodesharedenyread = 4
'Admodesharedenywrite = 8
'Admodeshareexclusive = 12
'AdmodeunkNown = 0
'Admodewrite = 2
asstream.open
'astream.charset = "gb2312"
'astream.loadfromfile (recfilen)'로드 파일
'Assp = Astream. Size
asstream.position = 0'set 파일을로드 할 때 Assp로 세트합니다
'astream.writetexttmpstr00,1
iftxtthen
data = bytes2bstr (data)
asstream.writetextData, 1