Warning: getimagesize(C:\Windows\Temp\php7FC8.tmp) [function.getimagesize]: failed to open stream: No such file or directory in D:\AppServ\www\comenzando-desde-cero\repaso 9 (upload class)\ejemplo8 (cms galerias)\includes\class.upload.php on line 2877
Warning: fopen(C:\Windows\Temp\php7FC8.tmp) [function.fopen]: failed to open stream: No such file or directory in D:\AppServ\www\comenzando-desde-cero\repaso 9 (upload class)\ejemplo8 (cms galerias)\includes\class.upload.php on line 2936
Warning: move_uploaded_file(C:\Windows\Temp\php7FC8.tmp) [function.move-uploaded-file]: failed to open stream: No such file or directory in D:\AppServ\www\comenzando-desde-cero\repaso 9 (upload class)\ejemplo8 (cms galerias)\includes\class.upload.php on line 3635
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Windows\Temp\php7FC8.tmp' to 'productos/thumbnail/\22ada5ec9f4d73ea1e4d313f9c774284.jpg' in D:\AppServ\www\comenzando-desde-cero\repaso 9 (upload class)\ejemplo8 (cms galerias)\includes\class.upload.php on line 3635
aqui dejo mi codigo.
Código PHP:
Ver original
{ foreach($_FILES as $files => $file) { { $f=1; while($f) { $nombre = 'productos/'.$f.$file['name']; $nombre_imagen = $f.$file['name']; $f++; else $f=0; } // we instanciate the class for each element of $file $handle = new Upload($file); // then we check if the file has been uploaded properly // in its *temporary* location in the server (often, it is /tmp) if ($handle->uploaded) { $handle->image_resize = true; $handle->image_ratio_y = true; $handle->image_x = 252; $handle->Process('productos/thumbnail/'); // creo una variable $nombre_imagen para enviar los nombres de las imagenes. $nombre_imagen = $handle->file_dst_name; $handle->clean(); } else { // if we're here, the upload file failed for some reasons // i.e. the server didn't receive the file echo ' file not uploaded on the server'; echo ' Error: ' . $handle->error . ''; } // (imagen thb para las galerias) // we instanciate the class for each element of $file $imagen_thb = new Upload($file); // then we check if the file has been uploaded properly // in its *temporary* location in the server (often, it is /tmp) if ($imagen_thb->uploaded) { $imagen_thb->image_resize = true; $imagen_thb->image_ratio_fill = true; $imagen_thb->image_x = 74; $imagen_thb->image_y = 74; $imagen_thb->Process('productos/thumbnail/'); $foto_imagen_thb = $imagen_thb->file_dst_name; } // pregunto si la variable a ingresar esta o no vacia. if($nombre_imagen!="" && $foto_imagen_thb!="") { // hacemos el insert para la tabla puente que en este caso es galeria_producto $sql_galeria_fotos = "INSERT INTO galeria_producto(idproducto,imagen,imagen_thb)VALUES('$idproducto','$nombre_imagen','$foto_imagen_thb')"; echo $sql_galeria_fotos; echo "<br />"; } } } // termina el bucle foreach. }
saludos.