Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/11/2014, 14:02
Fozz
 
Fecha de Ingreso: noviembre-2013
Ubicación: México
Mensajes: 94
Antigüedad: 10 años, 5 meses
Puntos: 1
Respuesta: Problema al extraer imagen de la base de datos

pateketrueke me he puesto a analizar tu comentario y tienes mucha razón me hacía falta hacer la impresión, el código ya funciona solo le agregue una línea, aquí se los dejos..
muchas gracias!!
Código PHP:
Ver original
  1. while($f_anexos=sqlsrv_fetch_array($res_anexos))
  2.                     {
  3.                         $tipo_anexo = "";
  4.                         $link_anexo = "";
  5.             $anexos++;
  6.                          
  7.                         if ($f_anexos['tipo'] == "IMAGEN")
  8.             {
  9.                             $anexo= $f_anexos['anexo'];
  10.                                echo $anexo;                      
  11.                             $extension = "jpg";
  12.                             $tipo = "jpg";
  13.                             $nombre="imagen";
  14.                              
  15.                            header("Content-type: image/jpg");
  16.                             header("Content-Transfer-Encoding: Binary");
  17.                 //header('Content-length: 100');
  18.                             header('Content-disposition: attachment; filename="'.$nombre.'.'.$extension.'"');  
  19.                         }
  20. }