Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/04/2009, 07:39
Avatar de lyoung
lyoung
 
Fecha de Ingreso: noviembre-2005
Ubicación: Montevideo, la gran capit
Mensajes: 139
Antigüedad: 18 años, 5 meses
Puntos: 0
La página no toma las variables

Hola, estoy haciendo una galería de imágnes pero la función para hacer las miniaturas no funciona.
Aparentemente no está tomando las variables que le paso por la url.

Lo más raro es que en local si funciona y los problemas comienzan cuando lo subo al servidor remoto.

Necesito ayuda urgente por favor.

La llamada a la función es la siguietne. Está en el atributo src de la imagen, donde dice redimensionar.php?etc.
Los valores tomados de Mysql aparecen bien.

Código PHP:
echo '<div class="miniatura">'.$row_fotos['nombre_foto'].'
<a href=fotos.php?id_foto='
.$row_fotos['id_foto'].'>
<img src="redimensionar.php?medidas=120&mini_foto='
.$row_fotos['mini_foto'].'" border="0"></a></div>'
Y la página redimensionar.php es esta:

Código PHP:
$anchura=$medidas;
$hmax=$medidas;
if (
$foto!=""){$carpeta='fotos/';$mini_foto=$foto;}else{$carpeta='fotos/miniaturas/';}
$nombre=$carpeta.$mini_foto;//

$datos getimagesize($nombre);
if(
$datos[2]==1){$img = @imagecreatefromgif($nombre);}
if(
$datos[2]==2){$img = @imagecreatefromjpeg($nombre);}
if(
$datos[2]==3){$img = @imagecreatefrompng($nombre);}
$ratio = ($datos[0] / $anchura);
$altura = ($datos[1] / $ratio);
if(
$altura>$hmax){$anchura2=$hmax*$anchura/$altura;$altura=$hmax;$anchura=$anchura2;}
$thumb imagecreatetruecolor($anchura,$altura);
imagecopyresampled($thumb$img0000$anchura$altura$datos[0], $datos[1]);
if(
$datos[2]==1){header("Content-type: image/gif"); imagegif($thumb);}
if(
$datos[2]==2){header("Content-type: image/jpeg");imagejpeg($thumb);}
if(
$datos[2]==3){header("Content-type: image/png");imagepng($thumb); }
imagedestroy($thumb); 
__________________
Todo se ve mejor si le miramos el lado positivo.