
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í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>
Un saludo