Foros del Web » Programando para Internet » PHP »

ayuda con php!!!!

Estas en el tema de ayuda con php!!!! en el foro de PHP en Foros del Web. Hola estoy trabajando con imagenes, pero cuando quiero generar una me manda el siguiente error y en ves de mostrar la imagen me muestra caracteres ...
  #1 (permalink)  
Antiguo 17/04/2007, 08:03
 
Fecha de Ingreso: junio-2005
Mensajes: 30
Antigedad: 18 aos, 10 meses
Puntos: 0
ayuda con php!!!!

Hola estoy trabajando con imagenes, pero cuando quiero generar una me manda el siguiente error y en ves de mostrar la imagen me muestra caracteres raros que puedo hacer??? a continuacion el codigo y el resultado:

Codigo:
-------

<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="" content="text/html; charset=iso-8859-1">
</head>

<body>

<?

$imagen=ImageCreate (468, 60);
@Header("Content-type: image/bmp");

ImageJPEG($imagen, '', 75);

ImageDestroy($imagen);

?>

</body>
</html>

Resultado:
----------

Warning: Cannot modify header information - headers already sent by (output started at c:\servidor\web\image.php:10) in c:\servidor\web\image.php on line 13
JFIF;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 75 C    $.' ",#(7),01444'9=82<.342C  2!!222222222222222222222222222222222222222222222 22222<" ĵ}!1AQa"q2#BR$3 br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz  ĵw!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvw xyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (


Espero que me puedan ayudar, desde ya gracias!!!!
  #2 (permalink)  
Antiguo 17/04/2007, 08:08
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicacin: /home/ams/
Mensajes: 38.567
Antigedad: 17 aos, 10 meses
Puntos: 2135
Re: ayuda con php!!!!

Cuango generas imagenes con PHP, estas deben de estar por aparte no las puedes poner junto con etiquetas HTML, ya que son contenidos totalmente diferentes para poder ver tu imagen necesitas hacer algo asi:
Cdigo:
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="" content="text/html; charset=iso-8859-1">
</head>

<body>
<img src="tuscript.php">
</body>
</html>
y el codigo de tuscript.php tiene que ser ese de la imagen:
Cdigo PHP:

<?

$imagen
=ImageCreate (46860);
@
Header("Content-type: image/bmp");

ImageJPEG($imagen''75);

ImageDestroy($imagen);

?>
Salu2.
  #3 (permalink)  
Antiguo 17/04/2007, 09:43
 
Fecha de Ingreso: junio-2005
Mensajes: 30
Antigedad: 18 aos, 10 meses
Puntos: 0
De acuerdo Re: ayuda con php!!!!

gracias me re sirvio!!!!!
Atencin: Ests leyendo un tema que no tiene actividad desde hace ms de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:01.