Dejo la parte del código que interesa
Código:
AQUI LA FUNCION A LA QUE SE LLAMA PARA MOSTRAR LA IMAGEN<?php
require_once("conexion.php");
require_once("funciones.php");
$fechadia = @strtotime($_GET["dia"]);
$imagen=$_GET["anuncio"];
?>
<!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><?php echo $_GET["titulo"];?></title>
<link href="estilos.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="contenedor">
<div id="cabecera">Esta es la cabecera</div>
<div id="lateralizq">
<table>
<tr>
<td width="145" align="center"><a href="javascript:window.history.back()">Anterior</a></td>
</tr>
<tr>
<td align="center"><strong><?php echo strtoupper($_GET["ciudad"]);?></strong></td>
</tr>
<tr>
<td>
<?php
$sql="select nombre from secciones";
listado($sql,$_GET['ciudad']);
setlocale(LC_TIME,"spanish");
?>
</td>
</tr>
</table>
</div>
<div id="contenido">
<table width="450">
<tr>
<td width="330" align="left"><p style="margin:10px">Enviado el <?php echo strftime("%d de %B del %Y",$fechadia);?> a las <?php echo substr($_GET["hora"],0,-3);?> horas</p></td>
</tr>
<tr>
<td bgcolor="#C2C8E2"><h2 style="margin:0px"><?php echo $_GET["titulo"];?></h2></td>
<td width="105" bgcolor="#C2C8E2"><h3 style="margin:0px"><?php echo $_GET["precio"];?> Euros</h3></td>
</tr>
<tr>
<td colspan="2"><h4 style="margin-top:0px" style="margin:1px">(<?php echo $_GET["tipo"];?>)</h4></td>
</tr>
<?php
// SI EXISTE LA IMAGEN LA MOSTRAMOS
// COLOCO LA IMAGEN 115 SOLO DEMOMENTO PARA PROBAR SI FUNCIONA Y SABIENDO QUE ESTA EN EL LOCALHOST
if (file_exists("$_GET[seccion]/$_GET[tipo]/$_GET[anuncio].jpg"))
{
?>
<tr align="center">
<td align="center" colspan="2"><IMG SRC="http://localhost/bbddfolder/<?php echo $_GET["seccion"];?>/<?php echo $_GET["tipo"];?>/<?php redimensionar_foto('115.jpeg');?>></IMG></td>
</tr>
<?php
Código:
Y este es el error:function redimensionar_foto($filename)
{
// Variables que indican el archivo de la imagen y el nuevo tamano
$porcentaje = 0.5;
// Content-type para el navegador
header('Content-type: image/jpeg');
// Se obtienen las nuevas dimensiones
list($width, $height) = getimagesize($filename);
$newwidth = $width * $porcentaje;
$newheight = $height * $porcentaje;
// Cargar la imagen
$thumb = imagecreate($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
// Redimensionar
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
// Mostrar la nueva imagen
imagejpeg($thumb);
}
Enviado el 11 de marzo del 2011 a las 01:00 horas
Nvidia
15 Euros
(Tarjetas Gráficas)
< å·@ã¡NE�kjŸ|3§^}‚Þæm[Qíg¥Bnd8Îy_—#‚síTÇŠž]Î?wôPœµïÅ»2ZM+Â÷ëék4±“ÿ�|WŸD˜Eã/ jz"–ö¤Å;O« ý�c^—L’(åFI]meaÃÐûP='YÓu˾Ó/ »¶~’Bá†}¡äpy~¼Ã[øeq£ê¯|>¹N¥Ökÿ�¢Ý~R½©Çn˜Ú~jØð'Ä|RgÓoíÛNñˆÅå„ ‚0q¹3ÕrG¸ÈëHoEPEPEPEPEPEPEPEPX0 ñ]Ÿƒô u;µi"8 O¿<§;Q~¸?@ ç¼Ý+ËtXÇĉ·šìÛ%м;)³Ó€V[®’õ9Ç?îÈ4§à¯ß6¦þ0ñiYüEt˜Ž/Oˆò#Œv88'ÜŽrŽ�P*«Ë{4F¸•#W‘bRÇf!TrH=”´�QE�QE�Wž|Fð,ÚºÅâ? mâ}7÷¶òÇ€g�«nÇ=xìx5èt„q................


