View previous topic :: View next topic |
Author |
Message |
spas
Joined: 12 Oct 2004 Posts: 3
|
Posted: Wed Nov 03, 2004 5:17 pm Post subject: Looking for ASP/VBscript function writing to file |
|
|
Hi,
I'm trying to write to a text file from ASP page, but no success so far .
Can anybody give me a ready ASP/VBScript function that writes to a file?
I want to pass the file name/location as parameter to this function.
Thanks in advance,
Spas |
|
Back to top |
|
|
administrator Site Admin
Joined: 01 Oct 2004 Posts: 183
|
Posted: Wed Nov 03, 2004 11:24 pm Post subject: |
|
|
I have ready-made VBScript function writing to a text file and I'll post it here tomorrow _________________ Peter
ASP & ASP.NET Articles and Tutorials |
|
Back to top |
|
|
administrator Site Admin
Joined: 01 Oct 2004 Posts: 183
|
Posted: Thu Nov 04, 2004 9:25 am Post subject: |
|
|
Here is the ASP/VBscript function that writes to a file:
Code: |
Sub WriteFile(ByVal sContent, ByVal sFilePath)
Dim oFSO, oTF
Set oFSO = Server.CreateObject("Scripting.FileSystemObject")
Set oTF = oFSO.OpenTextFile(sFilePath, 2, True)
oTF.Write(sContent)
oTF.Close
Set oTF = Nothing
Set oFSO = Nothing
End Sub
|
_________________ Peter
ASP & ASP.NET Articles and Tutorials |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|