Re: header wierdness
| From: | Chris Lee | Date: | Sun, 24 Dec 2000 22:50:35 +0000 |
| Subject: | Re: header wierdness | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31767@lists.php.net to get a copy of this message | ||
Can you supply a code fragment? I dont think my answer is the problem,
but I'll mention it anyhow. Are you running php-4.0.4 ? check your
header() function.
Header("Content-Type: image/gif");
Header("Content-Type: image/gif", 0);
the first Header() defaults to replace, the second add's not replaces the
"Content-Type" ... double check your header() function
Header("Content-Type: "image/gif");
will send "Content-Type: " as the first arg and "image/gif" as the
second, "image/gif" when converted to an integer will equal 0 so in a
sese what is really beeing sent is.
Header("Content-Type: ", 0);
I havent tested any of this, but its a sujestion. But with a code
fragment its easy to see the fault without guess's
Chris Lee
Mediawaveonline.com
In article <Pine.LNX.4.30.0012231941060.870-100000@localhost.localdomain>,
"Rasmus Lerdorf" <rasmus@php.net> wrote:
> You need to provide more information such as PHP version, OS, web
> server, etc. This works fine for me on all versions of PHP I use.
>
> -Rasmus
>
> On Sat, 23 Dec 2000, Marc Swanson wrote:
>
>> Hello All,
>>
>> I just wrote some code to display thumbnails of images using the
>> compiled in GD stuff for jpegs and I found that the behavior is not as
>> expected under Netscape.
>>
>> I've tracked the problem down to the fact that the header will contain
>> a Content-type: text/html when it should contain Content-type:
>> image/jpeg
>>
>> I tried using the "header" function as described in the manual to force
>> the header to image/jpeg but when I examined the header I discovered
>> that it is STILL trying to print the text/html line (eg there are two
>> Content-type lines... with text/html being the last one)
>>
>> I'm using fpasstrhough to output the raw binary data from the jpeg.
>> Because of this text/html content-type line Netscape is just puking up
>> the binary instead of displaying the image. How can I solve this
>> problem??
>>
>>
>> Thanks!
>>
>>
>> -Marc-
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail:
>> php-general-unsubscribe@lists.php.net For additional commands, e-mail:
>> php-general-help@lists.php.net To contact the list administrators,
>> e-mail: php-list-admin@lists.php.net
>>
>
>
>