discusmania
IS-IT--Management
I've write this code. I know there's something wrong.... can anyone correct me?
Thanks so much
New in ASP...
Set ScriptObject = server.CreateObject("Scripting.FileSystemObject"
'check the file existing--Nor(2/2/01)
if ScriptObject.FileExist(Server.mappath(Request.ServerVariables("PATH_INFO")) then
response.write"file exist"
else
'Create and Write to a File
pathEnd = Len(Server.mappath(Request.ServerVariables("PATH_INFO"))-12
'12 is the length of chars used to spell s a v e f i l e . a s p
Set MyFile=ScriptObject.CreateTextFile(Left(Server.mappath(Request.ServerVariables("PATH_INFO"),pathEnd)&filename)
For i = 1 to LenB(value)
MyFile.Write chr(AscB(MidB(value,i,1)))
Next
session("urlupload"=" & filename
'response.write session("urlupload"
MyFile.Close
'response.redirect(" response.write"upload complete"
end if
Thanks so much
New in ASP...
Set ScriptObject = server.CreateObject("Scripting.FileSystemObject"
'check the file existing--Nor(2/2/01)
if ScriptObject.FileExist(Server.mappath(Request.ServerVariables("PATH_INFO")) then
response.write"file exist"
else
'Create and Write to a File
pathEnd = Len(Server.mappath(Request.ServerVariables("PATH_INFO"))-12
'12 is the length of chars used to spell s a v e f i l e . a s p
Set MyFile=ScriptObject.CreateTextFile(Left(Server.mappath(Request.ServerVariables("PATH_INFO"),pathEnd)&filename)
For i = 1 to LenB(value)
MyFile.Write chr(AscB(MidB(value,i,1)))
Next
session("urlupload"=" & filename
'response.write session("urlupload"
MyFile.Close
'response.redirect(" response.write"upload complete"
end if