Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/10/2014, 13:14
Avatar de enlinea777
enlinea777
 
Fecha de Ingreso: mayo-2008
Ubicación: frente al pc
Mensajes: 1.830
Antigüedad: 16 años
Puntos: 127
Respuesta: Subir imágenes a directorio en servidor

$lugar
debe ser una direccion absoluta


Código PHP:
    $fileName2 time().$fileName;
    
$lugar=dirname(__FILE__) . "/fotosproyectos/";
    if(
move_uploaded_file($_FILES['files']['tmp_name'],$lugar.$fileName2)){
        
$isertImagen mysql_query("INSERT INTO tbl_foto_ideas_proyectos
        (name, type, size, content, id_ip) VALUES
        ('$fileName', '$fileType', '$fileSize', '$content', '$IdIp');"
);
    } 
Prueba eso.