Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/04/2007, 12:19
Avatar de el cirujano
el cirujano
 
Fecha de Ingreso: mayo-2003
Ubicación: Frente al PC
Mensajes: 609
Antigüedad: 23 años, 5 meses
Puntos: 3
Re: multiples uploads - thumbnails

con este script yo subo de manera confiable varios archivos, ahorita estoy en el trabajo y por eso no te adapto lo de hacer los thumbs....

Código PHP:
$N = 5; //cantidad de archivos a subir
for($i=0; $i<$N; $i++) {

    if  (
is_uploaded_file($HTTP_POST_FILES['archivo']['tmp_name'][$i])) {
        
$no_doc = $HTTP_POST_VARS['no_web_doc'][$i];
        
$split_path = split("/", $HTTP_POST_FILES['archivo']['name'][$i]);

        
$split_path = end ($split_path);

    if (
end($extension) == "php" || end($extension) == "php3") {

        echo 
"tipo de archivo invalido";

} else {

    
$RUTA_UPLOADED = "../docs/";

        
$NOMBRE_FILE = $split_path;
        
$archivosX[] = $split_path;

            
move_uploaded_file($HTTP_POST_FILES['archivo']['tmp_name'][$i], $RUTA_UPLOADED . $NOMBRE_FILE);

$imgcentral = $NOMBRE_FILE;

echo 
$sql = mysql_query("INSERT INTO tabla VALUES('$titulo', '$fecha', '$descripcion', '$imgcentral', '$muestra1', '$muestra2', '$muestra3', '$muestra4', '$muestra5', '$muestra6') ");
}
}
} 
__________________
CSS2 + AJAX + PHP + MySQL, una mezcla sin competencia!!!!!!