Guest_imported
New member
- Jan 1, 1970
- 0
Hi,
I'm updating a site. I have to add a directory every time a record is added. I wrote the following code but it seems to freeze up the server every time it's being used. What can it be and how do I solve this issue, please help!!!
Thanks in advance,
Shay
The code:
set fs=createobject("scripting.filesystemobject"
MyFolder=server.mappath("./../stores/" & user_id & "/"
If NOT fs.folderexists(MyFolder) then
fs.createfolder(MyFolder)
End If
Check if the creation was a success or not
If fs.folderexists(MyFolder) then
TheFile = MyFolder & "\index.html"
Set filetemp = fs.CreateTextFile(TheFile,true)
filetemp.WriteLine("redirecting you now!"
filetemp.close
End If
set fs=nothing
I'm updating a site. I have to add a directory every time a record is added. I wrote the following code but it seems to freeze up the server every time it's being used. What can it be and how do I solve this issue, please help!!!
Thanks in advance,
Shay
The code:
set fs=createobject("scripting.filesystemobject"
MyFolder=server.mappath("./../stores/" & user_id & "/"
If NOT fs.folderexists(MyFolder) then
fs.createfolder(MyFolder)
End If
Check if the creation was a success or not
If fs.folderexists(MyFolder) then
TheFile = MyFolder & "\index.html"
Set filetemp = fs.CreateTextFile(TheFile,true)
filetemp.WriteLine("redirecting you now!"
filetemp.close
End If
set fs=nothing