|
Posted by Rik on 09/11/06 08:01
Summer wrote:
> Any idea why this code doesn't work?
>
> <html>
> <body>
> <?php
> $im = imagecreatefrompng("220.png");
> imagepng($im);
> imagedestroy($im);
>>
> </body>
> </html>
First of all, an image is not html. Remove the HTML tags.
Second: have you got display_errors on and error_reporting on E_ALL?
(<?php
ini_set('display_errors','1');
error_reporting(E_ALL);
?>)
To check wether it can find the image allright.
If you get gibberish on your screen, try header('Content-type: image/png');
befor imagepng().
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|