----- Original Message -----
From: "Johan Vikerskog (EMP)" <[EMAIL PROTECTED]>
To: "'Stefan Rusterholz'" <[EMAIL PROTECTED]>; "Johan Vikerskog (EMP)"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, September 25, 2001 9:07 AM
Subject: RE: [PHP] imageJPEG problem.


> Thanks for your answer but the problem remains.
> It says i allready have given the header information and everything comes
out in ascii.
>
> file://Johan
>
> -----Original Message-----
> From: Stefan Rusterholz [mailto:[EMAIL PROTECTED]]
> Sent: den 25 september 2001 08:55
> To: Johan Vikerskog (EMP); [EMAIL PROTECTED]
> Subject: Re: [PHP] imageJPEG problem.
>
>
> ----- Original Message -----
> From: "Johan Vikerskog (EMP)" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 25, 2001 8:47 AM
> Subject: [PHP] imageJPEG problem.
>
>
> > When trying to use a simple code like this below i receive an error
which
> says that it cant find the header.
> >
> > <?
> > Header("Content-type: image/jpeg");
>
> I don't know about the other stuff of your script, but when I wrote a
> similar script, I took "content-type: image/jpg" and not 'jpeg'.
> Probably that's the point...
>
> > $im = imagecreatefromjpeg("./test.jpg");
> > Imagejpeg($im,'',20);
> > ImageDestroy($im);
> > ?>
> >
> > It outputs the information in ascii and binary code. it doesn't show the
> picture
> >
> > Thanks for all the help you can give me.
> > file://Johan
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]

make sure you run the php-part at the very top of the file:
<?php
    header(...);
?>
<HTML>
<HEAD>
...and so on


if you have output before you execute the php part, your webserver will
generate the header for you and then it is impossible to send another header
(exactly because of what the warning tells you: the headers are already
sent - but by the server and not by you and the server normally assumes
text/html or text/plain).

 I hope, it helps
 regards

 Stefan Rusterholz





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to