Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
gostari de uma ajuda para poder corrigir erro esta veste codigo que eu estou precisando para colocar em meu site este codigo esta disponivel aqui mesmo no forum mais como sou novato em asp ja tentei de todo mais ainda continua dando erro este aqui e o codigo.
link do forum
http://forum.imasters.com.br/index.php?/topic/200877-criar-pasta-e-fazer-upload-na-mesma/
----------------------------------------------------------formulario.asp--------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="[http://www.w3.org/1999/xhtml">](http://www.w3.org/1999/xhtml)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="240" border="0" cellpadding="0" cellspacing="0">
<form action="insere_teste.asp" method="post" name="form" enctype="multipart/form-data">
<tr>
<td width="60" height="20">Data: </td>
<td width="180"><input name="dia" type="text" class="form" id="dia" size="3" maxlength="2"><input name="ano" type="text" class="form" id="ano" size="5" maxlength="4"></td>
</tr>
<tr>
<td height="20" class="texto">Titulo: </td>
<td width="180"><input name="titulo" type="text" class="form" id="titulo" size="30" maxlength="26"></td>
</tr>
<tr>
<td height="20" class="texto">Pasta: </td>
<td width="180"><input name="pasta" type="text" class="form" id="pasta" size="30" maxlength="26"></td>
</tr>
<tr>
<td height="20" class="texto">Foto: </td>
<td width="180"><input name="foto1" type="file" class="form" id="foto" size="30" maxlength="26"></td>
</tr>
<tr>
<td height="20" class="texto">Foto: </td>
<td width="180"><input name="foto2" type="file" class="form" id="foto" size="30" maxlength="26"></td>
</tr>
<tr>
<td height="20" class="texto">Foto: </td>
<td width="180"><input name="foto3" type="file" class="form" id="foto" size="30" maxlength="26"></td>
</tr>
<tr>
<td height="30"></td>
<td width="180"><input name="Enviar" type="submit" class="form" id="Enviar" value="Enviar"> <input name="Limpar" type="reset" class="form" id="Limpar" value="Limpar"></td>
</tr></form>
</table>
</body>
</html>
----------------------------------------------------------fim do formulario-------------------------------------------------------
-----------------------------------------------------------insere_teste.asp-------------------------------------------------------
<%
Function CreateFolderDemo(pasta)
Dim fso, f, dir
dir = "d:\Domains\webconexao.com.br\wwwroot\teste\" & pasta
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateFolder(dir)
response.write("lemos a pasta que é " & pasta & "<br /><br />")
CreateFolderDemo = f.Path
End Function
Set Upload = Server.CreateObject("Persits.Upload")
Upload.OverwriteFiles = False
Upload.SetMaxSize 1048576 'Tamanho máximo do arquivo em Bytes
not_pasta = Upload.form("pasta")
call CreateFolderDemo(not_pasta)
Count = Upload.Save("d:\Domains\webconexao.com.br\wwwroot\teste\" & not_pasta)
not_titulo = Upload.form("titulo")
'data
not_dia = Upload.form("dia")
not_mes = Upload.form("mes")
not_ano = Upload.form("ano")
not_data = not_dia + "/" + not_mes + "/" + not_ano
qtdade = 0
'conta as fotos
For Each File in Upload.Files
qtdade = qtdade + 1
Next
qtdade = qtdade
Response.write(qtdade & " - " & not_titulo & " - " & not_data & " - " & not_pasta)
%>-----------------------------------------------------------fim--------------------------------------------------------------------
aqui eu coloco o link para ver o erro
Microsoft VBScript runtime error '800a003a'
File already exists
/insere_teste.asp, line 7
link de teste
http://www.webconexao.com.br/formulario.asp
obrigado ate mais
Carregando comentários...