Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 9th, 2005, 4:41 PM   #1
paulchwd
Hobbyist Programmer
 
paulchwd's Avatar
 
Join Date: Mar 2005
Posts: 139
Rep Power: 4 paulchwd is on a distinguished road
Help:::::::: Why Wont This Work??????

I am trying to run this simple script through IIS. Y wont it work? I've used this code a 100 times in the past?

code below:::::


<%
response.write "File is writing"
Dim fs, ts
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set ts=fs.CreateTextFile("C:\myLogs\log.txt", True)
ts.WriteLine "TEST"
ts.close
Set fs=Nothing
response.write "File Written"
%>


the scritpt doesn't work for some reason. I try to load it (http://localhost/devs/file.asp)
and it just keeps trying to load. It wont actuall excute this script.
I tried a simple script like a simple response.write and it worked. So I dont think its an IIS 5.1 problem.

PS: i tied running it as both an admin user and a normal user. Same result
paulchwd is offline   Reply With Quote
Old Jul 10th, 2005, 1:34 PM   #2
PhillipH
Newbie
 
Join Date: Jul 2005
Posts: 9
Rep Power: 0 PhillipH is on a distinguished road
this is the kind of code i use for writing to a text file

	filename=Server.mappath("\pathtofile\log") & ".txt"
	Set fs = Server.CreateObject("Scripting.FileSystemObject")
	Set file = fs.opentextfile(filename,8,true)
	file.writeline
	file.write "TEST"
	file.Close
	set file=nothing
	set fs=nothing
__________________
Phillip Harrison
http://www.onestop-webdesign.com
PhillipH is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:00 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC