'讀取文件 Set fso = CreateObject("Scripting.FileSystemObject") Set htmlwrite=fso.OpenTextFile(server.MapPath("/inc/config.asp")) strOut=htmlwrite.ReadAll htmlwrite.close response.write(strOut) |
'request.收集文檔并生成文件 Dim txtFile,FSO,myFile,a,b,txt a = request("config") txtFile = Server.mapPath("/inc/config.asp") Set FSO = createObject("Scripting.FileSystemObject") Set myFile = FSO.createTextFile(txtfile,True) myFile.writeLine(a) '第一次寫入 myFile.close '注意這(zhè)裏要關閉 set myFile = Nothing |