Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/07/2003, 18:19
dominguez
 
Fecha de Ingreso: julio-2003
Mensajes: 463
Antigüedad: 20 años, 9 meses
Puntos: 0
No hay solución para el problema de subir un archivo a un servidor ??

Hola, alguien me puede decir que es lo q estoy haciendo mal, pq esto no funciona:

<?php
$tipo=$_FILES ['archivo']['type'];

if($tipo=="text/plain" || $tipo=="application/pdf" || $tipo=="application/msword")
{
if($_FILES ['archivo']['size'] < 30000)
{
if(move_uploaded_file($_FILES['archivo'],'carpeta/'.$_FILES ['archivo']['name']))
{
echo "UPLOAD ";
}
}
}
?>

El envio del archivo:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" height="448" border="0" align="center">
<tr>
<td><form action="envia.php" method="post" name="Envia" enctype="multipart/form-data">
<table width="25%" border="0" align="center">
<tr>
<td> <input name="archivo" type="file"></td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="Aceptar"></td>
</tr>
</table>

</form>
</td>
</tr>
</table>
</body>
</html>

Un saludo y gracias.

Última edición por dominguez; 25/07/2003 a las 10:57