Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/06/2006, 04:32
Pinyo22
 
Fecha de Ingreso: mayo-2006
Mensajes: 59
Antigüedad: 18 años
Puntos: 0
No traspaso correctamente las variables a una funcion.

Por muchas pruebas que hago. No se donde cometo el error para pasar la variable a la funcion.


Código PHP:
<?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$source0000$newwidth$newheight$width$height);

    
// Mostrar la nueva imagen
    
imagejpeg($thumb);
    
imagedestroy($thumb);
}

$IDSORTIDA 'grafiques/images/' '060226AA''.jpg';

echo 
"<a href=\" " $IDSORTIDA "\"><img src='Tamany_petit(\"$IDSORTIDA\")' border=\"0\"></a></td>";

?>