Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/12/2007, 12:44
Evidiel
 
Fecha de Ingreso: agosto-2002
Mensajes: 32
Antigüedad: 21 años, 9 meses
Puntos: 0
Imagen de sql server a php

hola, tengo imagenes insertada en una BDD sql Server 2000, en un campo Image (Binary); y necesito visualizarla en una pagina php, no lo he logrado aun, el codigo de prueba que tengo es el siguiente:

<?php
include("../PLANOS/conexion.php");
$numPlano="81002-85074";
$result = mssql_query("SELECT IMAGEN FROM PLANOS WHERE NUM_PLANO=\"$numPlano\"");
$result_array = mssql_fetch_array($result);
header("Content-Type: image/jpeg");


echo $result_array[0];
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
</body>
</html>

me sale un cuadro con la X y el recudro en blanco