Write Base64 encoded data to files with ASP

xiaoxiao2021-04-07  330

Function Writebase64File (filename, content)

DIM XML

SET XML = Server.createObject ("msxml2.domdocument")

DIM STM

Set stm = server.createObject ("adodb.stream")

Set root = Xml.createElement ("TIF")

root.text = Content

Root.DataType = "bin.base64"

Stm.Type = 1

Stm.open

Stm.write root.nodetypedPalue

Stm.savetofile Server.mappath (filename)

Stm.close

Set root = Nothing

SET XML = Nothing

SET STM = Nothing

END FUNCTION

转载请注明原文地址:https://www.9cbs.com/read-132590.html

New Post(0)