Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/03/2005, 15:24
maritomarito
 
Fecha de Ingreso: octubre-2004
Mensajes: 46
Antigüedad: 19 años, 5 meses
Puntos: 0
Exclamación **problema al presentar IMAGEN traida de BD

TENGO UN PROBLEMA NO PUEDO CARGAR UNA IMAGEN TRAIDA DE MI BASE DE DATOS,
creo que mi problema es el header pero no se como modificarlo el de htm con el de php...... por que si uso el codigo solo php si funciona




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php
//Conexion con la base
$link=OCILogon("ivr","ivr","ivr");
$sql1= "SELECT b.imagen from libros@uees a,caratulas@uees b where a.codigo='000008' and a.codigo=b.lib_codigo order by a.codigo";
$result = OCIParse($link,$sql1);
$stmt=OCIParse($link,$sql1);
//$blob=OCINewDescriptor($link,OCI_D_LOB);
OCIExecute($stmt);
while (ocifetch ($stmt))
{
$imagen=ociresult($stmt,1);
header("content-type: image/jpeg",false);

}
$x=100;
$y=100;
OCILogOff($link);

?>

<body>
<img name="imagen" src="<?php echo $imagen?>" width="<?php echo $x?>" height="<?php echo $y?>" alt="">
</body>
</html>