thors1982 Posted January 30, 2007 Share Posted January 30, 2007 I am very new to PHP I am just trying to learn it... I have a C++ backgroundBut, I can not get a PNG image to display after i modify it.For example... this code does not display a image it displays ASCII characters instead$landscapefile = 'landscape.png';$landscapeimage = imagecreatefrompng($landscapefile);imagepng($landscapeimage);Granted this is not the full extent of what I am doing, but it causes the same problemAslo, i checked my phpinfo and GD support is enabled as well as PNG support. Link to comment https://forums.phpfreaks.com/topic/36384-cant-display-an-image-with-php/ Share on other sites More sharing options...
linuxdream Posted January 30, 2007 Share Posted January 30, 2007 Did you set the headers of the page to display an image type and not just text/hml? Link to comment https://forums.phpfreaks.com/topic/36384-cant-display-an-image-with-php/#findComment-173070 Share on other sites More sharing options...
Ninjakreborn Posted January 30, 2007 Share Posted January 30, 2007 [quote]header('Content-Type: image/png');[/quote]That is what you would want to look at.http://us2.php.net/header Link to comment https://forums.phpfreaks.com/topic/36384-cant-display-an-image-with-php/#findComment-173074 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.