View Full Version : file stream
dw5304
04-08-2005, 04:05 AM
is it posable to read and write .log file instesad of a .txt?
i want the ability to add user from the web so i can add them when im not at my home pc. any help will be Appreciated.
glenngv
04-08-2005, 04:36 AM
Yes, you can read and write text files of any extension. Just use FSO (http://www.w3schools.com/asp/asp_ref_filesystem.asp).
dw5304
04-08-2005, 11:02 PM
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.OpenTextFile(Server.MapPath("testread.log"),8,true)
f.WriteLine("This text will be added to the end of file")
f.Close
set f=Nothing
set fs=Nothing
%>
is there something worng w/ this?
wont run in internet explorer internal server error.
mozilla says "Microsoft JScript compilation error '800a03ec'
Expected ';'
/Test.asp, line 3
dim fs,f
----^"
glenngv
04-11-2005, 03:31 AM
It seems you're using JScript as the scripting language but your code is VBScript.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.