Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/12/2006, 18:29
IntentoAprender
 
Fecha de Ingreso: diciembre-2006
Mensajes: 2
Antigüedad: 17 años, 4 meses
Puntos: 0
Problemas con archivos BLOB

Hola,

Estoy intentando acceder a unas imágenes que he guardado en mysql como longblob, mediante el script siguiente:

mysql_select_db($database_INVENTOS, $INVENTOS);
$query_QUERY_ARCHIVO = "SELECT TITULO,ARCHIVO FROM inventos";
$QUERY_ARCHIVO = mysql_query($query_QUERY_ARCHIVO, $INVENTOS) or die(mysql_error());
$row_QUERY_ARCHIVO = mysql_fetch_assoc($QUERY_ARCHIVO);
$totalRows_QUERY_ARCHIVO = mysql_num_rows($QUERY_ARCHIVO);
$contenido = $row_QUERY_ARCHIVO['ARCHIVO'];
header("Content-type: image/jpeg");
print $contenido;

Pero luego al ejecutar, me sale el siguiente error:

<b>Warning</b>: Cannot modify header information - headers already sent by (output started at c:\raiz\webs\easyphp1-8\www\inventos\inicio.php:32) in <b>c:\raiz\webs\easyphp1-8\www\inventos\inicio.php</b> on line <b>39</b><br />

¿Me podría decir alguien qué es lo que estoy haciendo mal?¿Cómo puedo mostrar el archivo?
Muchas gracias, sinceramente.