Cita:
Iniciado por Jowel17
mira ahora mi problema es k en ves de la imagen me muestra esto :
GIF89ah�@�æ��Š†{skToH4�Ž‹©ÈîUOGÿÿô¯¯¨ÐÓË3./Ƕ™{‡‘‰‘^MD;Š«×G7,ŽmSâèÛÄħôóå|„O”¸â‰}iÍž_¢™†ýý zîòæòôèÃhŒ€ZEf41ž¦¬lz‡~|{zT@{tiYiz·¶�lu<ÇƲaWGÕãöƒ œ¯öÒŽ¾¿£je_§¢Š¹ª’°rwëìßJT`õûïT+/( aZVqkf«¢•ÁÙõcA.èâÏÒ˸ûñØÞÜˬ‰\ž©s ”™˜ÛÀ�óìÓ’šnòüþûç¶òðâŸ}YÕÔ½µŸ…÷õç‰aKÕêis|üúèV[0½N‰>EM¦¯VŸ·Ôe`KöæÎÜß×fkq^7!B ‡ŒEåÔ¯ûôã:7:aL=âîø™X^GJuN:`_bã»y*´€" •�VœBqzgnÌζrvZ89(ÿûÆô÷ì\"(�Àèfk+~FN%"'2®¯�wb M{8?§_c¹¹¹ÿÿÿ!ù�����,����h�@��ÿ€~‚ƒ„…†‡ˆ‰Š‹Œ�Ž� ‘’“”•–—˜™š›™‚œŸ ¡¢£‘žH‘u*®®Q![kD*u¹º!jq%+qq+ÃÆÇÆRÌÏÍÑJc;¨
lo recorte para no poner todo pero k tengo k hacer para arreglar esto?
Código PHP:
Ver original<html>
<body bgcolor="#FFFFFF" style="background-image: url('')">
<link href="style.css" type="text/css" rel="stylesheet" />
<head>
<?php
function conectarse($host,$usuario,$password,$BBDD){
return $link;
}
$link=conectarse("localhost","user","pass","DB");
$id = $_GET['id'];
$sql = "SELECT * FROM detalles WHERE id = '$id';";
?>
<html>
<head>
<title>ASELIN - Asesoria Legal Inmobiliaria</title>
</head>
<center>
<table width="50%" border=0 cellspacing=2 cellpadding=4 style="position:absolute;top:0px;left:0px; bordercolor=; width:720px; height:29px"666633" bgcolor="white">
<tr bgcolor="a0e528"><td><b><font color="437c0b">Descripción</font></b></td><td><b><font color="437c0b">Imagen</font></b></td>
<?
{
$imagen = "<img src='http://tuurl.com/tupath/images.php?id=".$rs['ID']."'>";
echo "<tr>"
."<td>".$rs['descripcion']."</td>"
."<td>".$imagen."</td>"
."</tr>";
}
?>
</table></center>
</body>
</html>
Y este es el codigo del image.php
Código PHP:
/* Script image.php */
function conectarse($host,$usuario,$password,$BBDD){
$link=mysql_connect($host,$usuario,$password) or die (mysql_error());
mysql_select_db($BBDD,$link) or die (mysql_error());
return $link;
}
$link=conectarse("localhost","user","pass","DB");
$id = $_REQUEST['id'];
$sql = "SELECT * FROM detalles WHERE id = '$id';";
$res = mysql_query($qry);
$tipo = mysql_result($res, 0, "filetype");
$contenido = mysql_result($res, 0, "imagen");
header("Content-type: $tipo");
print $contenido;
DE verdad según yo ya te habían dicho cual era la solución pero bueno aquí te la pongo prácticamente, aquí esta la solución ok?