Hello, I have spent ages on this.
The following gives this when viewed in a browser.
\uploadedimg\abcde\TextFil
e.txt
all well and good
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
if ("" = "") then
Session("thatskuid") = "abcde"
end if
%>
<%
dim oktest
oktest = ("\uploadedimg\"& cStr(Session("thatskuid"))
&"\TextFile.txt")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<%= oktest %>
</body>
</html>
My problem is this.
<%
If (CStr(UploadFormRequest("M
M_update")
) = "formpicin") Then
If (Not MM_abortEdit) Then
Set fileObj=Server.CreateObjec
t("Scripti
ng.FileSys
temObject"
)
set file1=fileObj.CreateTextFi
le(Server.
MapPath("\
uploadedim
g\")&(Sess
ion("thats
kuid"))&"\
TextFile.t
xt")
file1.WriteLine("This is what goes to the text file that would be created")
file1.WriteLine("This is the second line of the text file")
file1.Close
set file1=nothing
set fileObj=nothing
End If
End If
%>
the value for the session is "abcde" but when this is viewed, the text file is not created and i get this error.
Microsoft VBScript runtime error '800a004c'
Path not found
but when i when i do it like this it works.
<%
If (CStr(UploadFormRequest("M
M_update")
) = "formpicin") Then
If (Not MM_abortEdit) Then
Set fileObj=Server.CreateObjec
t("Scripti
ng.FileSys
temObject"
)
set file1=fileObj.CreateTextFi
le(Server.
MapPath("\
uploadedim
g\abcde")&
"\TextFile
.txt")
file1.WriteLine("This is what goes to the text file that would be created")
file1.WriteLine("This is the second line of the text file")
file1.Close
set file1=nothing
set fileObj=nothing
End If
End If
Please please can some one tell me why when i do itlike this it doesnt work
set file1=fileObj.CreateTextFi
le(Server.
MapPath("\
uploadedim
g\")&(Sess
ion("thats
kuid"))&"\
TextFile.t
xt")
thanks for help
k
Start Free Trial