Ir para conteúdo
Fórum Script Brasil
  • 0

Salvar Dados


Flavio Diniz

Pergunta

13 respostass a esta questão

Posts Recomendados

  • 0

CARA EU PRESOSO RECUPERAR OS DADOS E LEVAR PARA OUTRA PAGINA

TIPO

IMAGEM.JPG

IMAgem2.gif

tem como

ele processa na mesma pagina

ai eu não to entendendop nada

ele consegue recuperar os dados mais eu tenteu usar a variavel dele e não consegui

Experimentou Session ?

<%
Session("Arquivo1") = UpLoad.Form("Campo")%>

Link para o comentário
Compartilhar em outros sites

  • 0

veja o codigo

<%@ Language=VBScript %>
<% 
option explicit 
Response.Expires = -1
Server.ScriptTimeout = 600

%>



<!-- #include file="freeASPUpload.asp" -->

<%


' ****************************************************
' Change the value of the variable below to the pathname
' of a directory with write permissions, for example "C:\Inetpub\wwwroot"
  Dim uploadsDirVar
  uploadsDirVar = "C:\PASTA DE ARTES\SITES\ESTUDO\editor_html\editor\im" 
' ****************************************************

' Note: this file uploadTester.asp is just an example to demonstrate
' the capabilities of the freeASPUpload.asp class. There are no plans
' to add any new features to uploadTester.asp itself. Feel free to add
' your own code. If you are building a content management system, you
' may also want to consider this script: http://www.webfilebrowser.com/

  


function OutputForm()
%>
    
<form name="frmSend" method="POST" enctype="multipart/form-data" action="uploadtester.asp" onSubmit="return onSubmitForm();">
  File 1: 
  <input name=attach1 type=file size=35><br>
    File 2: <input name=attach2 type=file size=35><br>
    File 3: <input name=attach3 type=file size=35><br>
    File 4: <input name=attach4 type=file size=35><br>
    File 5: <input name=attach5 type=file size=35><br>
    File 6: <input name=attach6 type=file size=35><br>
    File 7: <input name=attach7 type=file size=35><br>
    File 8: <input name=attach8 type=file size=35><p><br>
    <br> 
    <input style="margin-top:4" type=submit value="Enviar"> </p>
    </form>
    
    
    <%  
	session("meu_form") = UpLoad.Form("attach1")
	%>


   
     
<%
end function

function TestEnvironment()
    Dim fso, fileName, testFile, streamTest
    TestEnvironment = ""
    Set fso = Server.CreateObject("Scripting.FileSystemObject")
    if not fso.FolderExists(uploadsDirVar) then
        TestEnvironment = "<B>Folder " & uploadsDirVar & " does not exist.</B><br>The value of your uploadsDirVar is incorrect. Open uploadTester.asp in an editor and change the value of uploadsDirVar to the pathname of a directory with write permissions."
        exit function
    end if
    fileName = uploadsDirVar & "\test.txt"
    on error resume next
    Set testFile = fso.CreateTextFile(fileName, true)
    If Err.Number<>0 then
        TestEnvironment = "<B>Folder " & uploadsDirVar & " does not have write permissions.</B><br>The value of your uploadsDirVar is incorrect. Open uploadTester.asp in an editor and change the value of uploadsDirVar to the pathname of a directory with write permissions."
        exit function
    end if
    Err.Clear
    testFile.Close
    fso.DeleteFile(fileName)
    If Err.Number<>0 then
        TestEnvironment = "<B>Folder " & uploadsDirVar & " does not have delete permissions</B>, although it does have write permissions.<br>Change the permissions for IUSR_<I>computername</I> on this folder."
        exit function
    end if
    Err.Clear
    Set streamTest = Server.CreateObject("ADODB.Stream")
    If Err.Number<>0 then
        TestEnvironment = "<B>The ADODB object <I>Stream</I> is not available in your server.</B><br>Check the Requirements page for information about upgrading your ADODB libraries."
        exit function
    end if
    Set streamTest = Nothing
end function
  

function SaveFiles
    Dim Upload, fileName, fileSize, ks, i, fileKey 

    Set Upload = New FreeASPUpload
    Upload.Save(uploadsDirVar)

    SaveFiles = ""
    ks = Upload.UploadedFiles.keys
    if (UBound(ks) <> -1) then
        SaveFiles = "<B>Files uploaded:</B> "             
            for each fileKey in Upload.UploadedFiles.keys
            SaveFiles = SaveFiles & Upload.UploadedFiles(fileKey).FileName & " (" & Upload.UploadedFiles(fileKey).Length & "B) "  
          	next
         
        	
    else
        SaveFiles = "The file name specified in the upload form does not correspond to a valid file in the system."
    end if 
    
end function
%>




<HTML>
<HEAD>
<TITLE>Test Free ASP Upload</TITLE>
<style>
BODY {background-color: white;font-family:arial; font-size:12}
</style>
<script>
function onSubmitForm() {
    var formDOMObj = document.frmSend;
    if (formDOMObj.attach1.value == "" && formDOMObj.attach2.value == "" && formDOMObj.attach3.value == "" && formDOMObj.attach4.value == "" )
        alert("Please press the browse button and pick a file.")
    else
        return true;
    return false;

}
</script>


</HEAD>

<BODY>

<br><br>
<div style="border-bottom: #A91905 2px solid;font-size:16">Upload files to your server</div>
<%
Dim diagnostics
if Request.ServerVariables("REQUEST_METHOD") <> "POST" then
    diagnostics = TestEnvironment()
    if diagnostics<>"" then
        response.write "<div style=""margin-left:20; margin-top:30; margin-right:30; margin-bottom:30;"">"
        response.write diagnostics
        response.write "<p>After you correct this problem, reload the page."
        response.write "</div>"
    else
        response.write "<div style=""margin-left:150"">"
        OutputForm()
        response.write "</div>"
    end if
else
    response.write "<div style=""margin-left:150"">"
    OutputForm()
    response.write SaveFiles()   
    response.write "<br><br></div>"      
end if

%>

<div style="border-top: #A91905 2px solid;font-size:10">Powered by <A HREF="http://www.freeaspupload.net/" style="color:black">Free ASP Upload</A></div>
<%   
response.redirect("publicar.asp")
%>	

</BODY>
</HTML>

Link para o comentário
Compartilhar em outros sites

  • 0

con session deu esse erro

Variável não definida: 'Upload'

/estudo/editor_html/editor/uploadtester.asp, line 50

Tipo de navegador:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Página:

GET /estudo/editor_html/editor/uploadtester.asp

Hora:

quinta-feira, 29 de janeiro de 2004, 17:36:38

Mais informações:

Suporte da Microsoft

Link para o comentário
Compartilhar em outros sites

  • 0

declare a váriavel

dim Upload

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,7k
×
×
  • Criar Novo...