![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 139
Rep Power: 4
![]() |
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 |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Jul 2005
Posts: 9
Rep Power: 0
![]() |
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|