Ir para conteúdo
Fórum Script Brasil

Renan Pullig

Membros
  • Total de itens

    3
  • Registro em

  • Última visita

Sobre Renan Pullig

Renan Pullig's Achievements

0

Reputação

  1. <script type='text/javascript'>window.mod_pagespeed_start = Number(new Date());</script> Obg pela ajuda eu estou tentando adaptá-lo para o meu código mas até agora sem sucesso. :(
  2. Olá pessoal estou utilizando essa pequena função para ler um arquivo e me retornar uma resposta porém há um problema, eu quero que ela leia o caminho que está no meu INPUT. Já tentei utilizar request.form porém não consegui. Segue abaixo o algoritmo. <% Function ReadBinaryFile(strFileName) on error resume next Set oStream = Server.CreateObject("ADODB.Stream") if Err.Number<>0 then ReadBinaryFile=Err.Description Err.Clear exit function end if oStream.Type = 1 'adTypeBinary oStream.Open oStream.LoadFromFile strFileName if Err.Number<>0 then ReadBinaryFile=Err.Description Err.Clear exit function end if ReadBinaryFile=oStream.Read oStream.Close set oStream = nothing if Err.Number<>0 then ReadBinaryFile=Err.Description End Function getbinary = ReadBinaryFile("C:\Inetpub\wwwroot\asp\purplepomegranate.jpg") response.write "Image size: " & UBound(getbinary) & "<br />" response.write "Image size (LenB): " & LenB(getbinary) & "<br />" response.write "Binary : " & TypeName(getbinary) & "<br />" for i=1 to LenB(getbinary) strImage = strImage & Chr(AscB(MidB(getbinary, i, 1))) next response.write "Converted string length: " & Len(strImage) & "<br />" response.write "Raw data: " & strImage %> e o HTML: <form method="post" action="TESTE.asp" enctype="multipart/form-data" onsubmit="ReadBinaryFile()"> <input type="file" name="arquivoUpload" id="arquivoUpload"/> <input type="submit" value="Binario"/> </form> elas estão em duas páginas diferentes.
×
×
  • Criar Novo...