Ver Mensaje Individual
  #4 (permalink)  
Antiguo 18/06/2006, 07:25
Avatar de Seppo
Seppo
 
Fecha de Ingreso: marzo-2005
Ubicación: Buenos Aires, Argentina
Mensajes: 1.284
Antigüedad: 21 años, 7 meses
Puntos: 17
Es que hay algo q estás haciendo mal... tenés que hacerlo en dos archivos, en uno incluir el código html y en el otro la imagen...

por ejemplo
archivo1.php
Código PHP:
<?php
$IDSORTIDA 
= 'grafiques/images/' . '060226AA'. '.jpg';
echo 
"<a href=\" " . $IDSORTIDA . "\"><img src='archivo2.php' border=\"0\"></a></td>";
archivo2.php
Código PHP:
function Tamany_petit($filename) {
    
$percent = 0.25;
    
    
// Content-type para el navegador
    
header('Content-type: image/jpeg');

    
// Se obtienen las nuevas dimensiones
    
list($width, $height) = getimagesize($filename);
    
$newwidth = $width * $percent;
    
$newheight = $height * $percent;

    
// 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);
    
imagedestroy($thumb);
}

$IDSORTIDA = 'grafiques/images/' . '060226AA'. '.jpg';
Tamany_petit("$IDSORTIDA\") 
no podés pasar en el mismo archivo texto plano de html y un archivo de imagen