Linia z błędu formułuje to: Set newfolder = filesys.CreateFolder(Server.MapPath(newfolderpath))
.
Oto kod poniżej:
If Request.Form("add")= "true" then
Dim prop, user, pwd, dir
prop = ChkString(request.Form("Prop"))
user = ChkString(request.Form("User"))
pswd = ChkString(request.Form("Pswd"))
dir = ChkString(request.Form("Dir"))
Dim filesys, newfolder, newfolderpath
newfolderpath = "/ppi/"& dir
set filesys=CreateObject("Scripting.FileSystemObject")
If filesys.FolderExists(Server.MapPath(newfolderpath)) = true Then
Response.Write("<center><br><br><span class='bodybigred'>Sorry, this folder already exists.</span><br><br><span class='bodybig'><a href='javascript:history.go(-1)'>Please try again</a></span><br><br><br><br><br><br></center>")
Else
Set newfolder = filesys.CreateFolder(Server.MapPath(newfolderpath))
SQL = "INSERT INTO PPI " &_
" (Property_Name, Username, Passwd, PPI_Dir) " &_
"VALUES ('" & prop & "','" & user & "','" & pswd & "','" & dir & "');"
Conn.Execute SQL
Conn.Close
Set Conn = Nothing
Set filesys = Nothing
Response.Redirect "ppi.asp?view=all&prop=" & prop & "&posted=true"
End If
End If
Set newfolder = filesys.CreateFolder(Server.MapPath(newfolderpath))
linii i użyj funkcji Watch, aby określić dokładną wartość „newfolderpath” w tym punkcie kodu. Co to jest?
/ppi/
? Czy/ppi/
faktycznie istnieje?