|
-
Aug 8th, 2000, 04:45 AM
#1
Thread Starter
Addicted Member
I've never really touched asp before never really needed it, but I've just a couple of questions about it.
first how can you open a text file for append in asp and add a line to it? and if the file does not exist it will be created?
second how do you open a text in asp for just output and write a line to it? and again if the file does not exist will it be created?.
thanx for any help.
-
Aug 8th, 2000, 05:37 AM
#2
Fanatic Member
Hi Crypt
you need to use the scripting object to do what you need.
first create your file system object by using
Set fs = CreateObject("Scripting.FileSystemObject")
Then set up your file object by using this
Set readfile=fs.OpenTextFile(filename,1,False)
The last paramater is used for if you want a file created if it can't find one in the specified filename.
then finally, use either readfile.readline to get a line of information or readfile.writeline to write a line. there is also other ones as well se here for more information
http://msdn.microsoft.com/scripting/...threadline.htm
Hope this helps
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Aug 8th, 2000, 09:52 PM
#3
Thread Starter
Addicted Member
thanx for the info, but one question about pws if someone can answer, I have it on my win98 cd but haven't installed it yet, but I heard you could test out asp with it so I think I will, but how do you test asp with it? just have it running and then open a webpage? or do you have to run the webpage from a certain path? or do you have to open it up in personal webserver or something?
thanx again.
-
Aug 8th, 2000, 11:06 PM
#4
Hyperactive Member
You have to put the ASP page in a directory that allows scripts to run.
Then in your webbrowser you would type something like:
http://localhost/mydir/myfile.asp
or
http://127.0.0.1/mydir/myfile.asp
or
http://myip/mydir/myfile.asp
"People who think they know everything are a great annoyance to those of us who do."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|