You are here: Re: imagepng doesn't work « All PHP « IT news, forums, messages
Re: imagepng doesn't work

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация