imagejpeg() only shows Text

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jamie17
Forum Newbie
Posts: 1
Joined: Wed Apr 24, 2002 12:17 am

imagejpeg() only shows Text

Post by jamie17 »

The imagejpeg()-Function only shows me text wenn I want to send an image directly to the browser.

I used the header function header("Content-type: image/jpeg"); in the top of the document because I have found that on Internet but it doesn´t change anything.

mfg
jamie
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

In the PHP manual in the entry for imagejpeg():

http://www.php.net/manual/en/function.imagejpeg.php

there is a user comment which states:
you must not leave empty space above the php code. Otherwise php sends clear text information to the browser...
Maybe that's what the problem is?

Mac
Post Reply