How can I use multiple PHP header content types on the same page? is this possible?

Posted by Jon on Stack Overflow See other posts from Stack Overflow or by Jon
Published on 2010-03-11T19:28:15Z Indexed on 2010/03/11 19:29 UTC
Read the original article Hit count: 195

Filed under:
|
|

Is it possible to use multiple header types in one document? For example:

header("Content-type: image/jpeg");
header('Content-Type: text/html; charset=utf-8');

returns the whole page as text/html... while

header('Content-Type: text/html; charset=utf-8');
header("Content-type: image/jpeg");

Returns the whole page as an image.... How can I use both types of content on the same page? I'm using ob_start() at the top and ob_end_flush() at the beginning.

© Stack Overflow or respective owner

Related posts about php

Related posts about headers