Coding Thread, ASP Classic FileSystemObject in Coding and Web Development; Can anyone confirm or deny that FileSystemObject methods need local paths not URLs ? I am trying to create a ...
-
25th August 2009, 04:34 PM #1 ASP Classic FileSystemObject
Can anyone confirm or deny that FileSystemObject methods need local paths not URLs ? I am trying to create a txt file on a hosted system and they are saying that you can only use urls for security as is standard security.
Is this true? So there is no way to write a txt file to an IIS webserver?
-
-
IDG Tech News
-
25th August 2009, 06:51 PM #2 I suspect what they're telling you is that they're not going to let you write files like this. ASP certainly supports it:
Code:
set oFso=server.CreateObject("scripting.filesystemobject")
sRoot=server.MapPath(".")
set oFile=osfo.createtextfile(sRoot & "\" & test.txt)
oFile.writeline "Testing"
oFile.close (server.mappath just works out "where am I?" - it will return something like c:\inetpub\wwwroot\mysite\myfolder)
The problem is that if you can write "good stuff" then a hacker can probably write "bad stuff"
What are you wanting to write? Could it be put in a database instead?
-
Thanks to srochford from:
TechMonkey (26th August 2009)
-
26th August 2009, 08:39 AM #3 Ta. Yeah sorry I know it does work, I have it running on a server here. It was mainly if they are right that it is standard not to allow it & then wondering what otehr people did if they are on hosted servers.
What I am doing is an emergency message system. If the school loses power or connection a page will be presented and I just wanted a text file to store time, date, message and reason that would be written by an admin page. Looks like I will have to stick with just uploading the text file.
-
SHARE:
Similar Threads
-
By NetworkGeezer in forum Coding
Replies: 16
Last Post: 2nd September 2011, 05:10 PM
-
By mattx in forum Jokes/Interweb Things
Replies: 6
Last Post: 21st April 2009, 11:56 AM
-
By placky in forum Scripts
Replies: 3
Last Post: 1st April 2008, 04:49 PM
-
By button_ripple in forum General Chat
Replies: 93
Last Post: 16th January 2008, 10:28 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
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