Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/04/2012, 17:50
Avatar de rodrigo791
rodrigo791
 
Fecha de Ingreso: noviembre-2009
Ubicación: Uruguay
Mensajes: 1.339
Antigüedad: 14 años, 5 meses
Puntos: 168
Subir archivos a servidor local

Hola, estoy haciendo un script en el cual quiero "subir" un archivo desde mi pc y guardarlo en mi servidor web local, que está en mi pc también.
Se que se guardan temporalmente en la carpeta tmp, estoy usando el wamp server.
Hice una carpeta llamada ARCHIVOS donde quiero que se guarde finalmente ahí el archivo.
Estos 2 archivos que estoy usando para la aplicación ( subirarchivo.html y subirarchivo.php ) están ubicados en la carpeta www ( sería como htdocs en otros casos ) y la carpeta tmp está ubicada antes de www.

subirarchivo.html

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3.  
  4.     <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  5.     <meta name="author" content="www.intercambiosvirtuales.org" />
  6.  
  7.     <title>SUBIR ARCHIVO</title>
  8. </head>
  9.  
  10.  
  11. <form method="post" action="subirarchivo.php" enctype="multipart/form-data">
  12. <p>Subir archivo</p>
  13. <input type="file" name="archivo"/>
  14. <input type="submit" name="enviar"/>
  15. </form>
  16.  
  17. </body>
  18. </html>

subirarchivo.php
Código PHP:
Ver original
  1. <?php
  2. if (is_uploaded_file($_FILES['archivo']['../tmp'])){
  3. move_uploaded_file($_FILES['archivo']['../tmp'],$_FILES['archivo']['../ARCHIVOS/']);
  4.     }
  5.  
  6. ?>

No tengo errores de ningun tipo, o sea php no me dice que tengo errores de sintaxis ni nada.
Simplemente no veo ningún archivo en ARCHIVOS , a ver si me dan una mano