Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/08/2003, 03:55
haven
 
Fecha de Ingreso: febrero-2002
Ubicación: Navarra
Mensajes: 701
Antigüedad: 23 años, 3 meses
Puntos: 2
haber si alguien sabe porque no funciona esto

Tengo un formulario en el cual mando un archivo adjunto por mail, el archivo lo sube al servidor para después enviarlo, pero no me recoge los datos del formulario, y no se por qué puede pasar, el formulario lo tengo en post, y así no funciona, pero si lo pongo en get, si funciona pero no se sube el archivo, , este es el código:

Código PHP:

<%

'no me recoge los datos del formulario
nombre = Request.QueryString("nombre")
files = Request.QueryString("files")
a = Request.QueryString("a")
response.write nombre &"--"& files


%>
<!--#include file="Loader.asp"-->
<%
if a = 1 then

'
con esto subimos el archivo al servidor sin componentes

Dim load
      Set load 
= new Loader
      
      
' calling initialize method
      load.initialize
      
   ' 
File binary data
   Dim fileData
      fileData 
load.getFileData("files")
   
' File name
   Dim fileName
      fileName = LCase(load.getFileName("files"))
   ' 
File path
   Dim filePath
      filePath 
load.getFilePath("files")
   
' File path complete
   Dim filePathComplete
      filePathComplete = load.getFilePathComplete("files")
   ' 
File size
   Dim fileSize
      fileSize 
load.getFileSize("files")
   
' File size translated
   Dim fileSizeTranslated
      fileSizeTranslated = load.getFileSizeTranslated("files")
   ' 
Content Type
   Dim contentType
      contentType 
load.getContentType("files")
   
' No. of Form elements
   Dim countElements
      countElements = load.Count
   ' 
Value of text input field "name"
   
Dim nameInput
      nameInput 
load.getValue("name")
   
' Path where file will be uploaded
   Dim pathToFile
      pathToFile = Server.mapPath("correo/curriculum/") & "\" & fileName
   ' 
Uploading file data
   Dim fileUploaded
      fileUploaded 
load.saveToFile ("files"pathToFile)
      
    
destroying load object
   Set load 
Nothing
   
   end 
if
%>
<
html>
<
head>
<
title>Documento sin t&iacute;tulo</title>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</
head>

<
body>
<
form name="form1" method="post" action="pruebas.asp?a=1" enctype="multipart/form-data">
  <
input name="nombre" type="text" id="nombre">
  <
input name="files" type="file" class="casilla" id="files" size=30>
  <
input type="submit" name="Submit" value="Enviar">
</
form>
 
</
body>
</
html
Haber si alguien sabe cual puede ser el motivo.

Un saludo
__________________
asp, php, .net, adaptandose a las necesidades