ti faccio vedere due script che uso di prova:
pagina creazione cartella
codice:
<%
if request.QueryString("sit")<>"" then
set fso=server.CreateObject("Scripting.FileSystemObject")
randomize
codice=int((66666 * rnd())+1)
newfolder=server.MapPath("/fotoappartamenti/prova" & codice)
if not fso.FolderExists(newfolder) then
fso.CreateFolder(newfolder)
end if
response.Redirect("Esempio_form.asp?pag=prova" & codice)
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Prova</table>
</body>
</html>
pagina upload (ripresa da uno degli esempi degli upload di baol)
codice:
<%
If Request("Upload")="1" then
Dim oUpload
Set oUpload = new cUpload
oUpload.AutoRename = False
oUpload.Overwrite = true
oUpload.SetPath "fotoappartamenti/" & request.QueryString("pag")
oUpload.Upload
oUpload.Save
response.Write nome
Set oUpload=Nothing
end if
%>
<FORM METHOD="Post" enctype="multipart/form-data" ACTION="?upload=1&pag=<%= request.QueryString("pag") %>">
File : <INPUT TYPE="file" NAME="Campo1">
<INPUT TYPE="submit" NAME="Enter">
</FORM>
Ancora</p>
e c'è questo ritardo...cmq non mi salva l'upload i file nella cartella...però non mi da neanche nessun errore...