How to create a file in ASP?
in ASP and found this script:
<%
thetext="Write this text in the file"
Set fs = CreateObject("Scripting.FileSystemObject")
Set wfile = fs.CreateTextFile("myfile.txt", True)
wfile.Write (thetext)
wfile.close
Set wfile=nothing
Set fs=nothing response.write("Text created")
%>
then I created an asp file containing only this script, named it
"create" and uploaded it on one account on one asp-supporting
free host. Then I tried to open that file using my IE6 browser
and received an error message. Then I checked my file manager
(on that free account) and saw that a new file (''myfile.txt") was
not created. I think I am missing something here. Can anyone,
please, explain to me what should I do in order to create files in ASP?
-
sunconsultancy Banned{{ DiscussionBoard.errors[342962].message }}-
truckload-of-thoughts -
Thanks - 1 reply
{{ DiscussionBoard.errors[343035].message }}-
truckload-of-thoughts -
Thanks - 1 reply
{{ DiscussionBoard.errors[345036].message }}-
rachusrs2 -
Thanks - 1 reply
{{ DiscussionBoard.errors[346268].message }}-
truckload-of-thoughts -
Thanks
{{ DiscussionBoard.errors[347752].message }} -
-
-
-
-
-
ofir Banned-
Thanks - 1 reply
{{ DiscussionBoard.errors[345172].message }}-
truckload-of-thoughts -
Thanks
{{ DiscussionBoard.errors[345199].message }} -
-
-
truckload-of-thoughts -
Thanks
{{ DiscussionBoard.errors[347277].message }} -