Ver Mensaje Individual
  #10 (permalink)  
Antiguo 02/01/2012, 06:57
Avatar de Patriarka
Patriarka
 
Fecha de Ingreso: enero-2011
Ubicación: Moreno, Buenos Aires, Argentina
Mensajes: 2.851
Antigüedad: 13 años, 3 meses
Puntos: 288
Respuesta: problema al subir multiples imagenes

Cita:
Iniciado por Patriarka Ver Mensaje
Código PHP:
Ver original
  1. if(isset($_FILES))
  2. {
  3.     foreach($_FILES as $files => $file)
  4.     {
  5.         if(isset($file['name']) && !$file['error'] $file['size']!=0)
  6.         {
  7.  
  8.         echo $file['name'].' <br />';
  9.                         $f=1;
  10.                         while ($f) {
  11.                             $nombre = './imagenes/'.$f.$file['name'];
  12.                             $nombre_imagen = $f.$file['name'];
  13.                             clearstatcache();
  14.                             if (file_exists($nombre))
  15.                                 $f++;
  16.                             else
  17.                                 $f=0;
  18.                         }
  19.  
  20.                         if (is_uploaded_file ($file['tmp_name']))   {
  21.                             copy($file['tmp_name'], $nombre);
  22.                             $nombre_path = $nombre;
  23.                         }
  24.  
  25.                     }    
  26.     }
  27. }
hay lo tenes!