Page 1 of 1

Problem with Headers

Posted: Mon Jun 23, 2008 7:17 am
by sj1983msh
Hi every body,

I have faced a problem with sending header to the browser.
I have written a block of code which sends some headers to the browser, but when I run the script in order to test the result, then I receive a Warning which refers to the multiple header sending to the browser.
Is my script not gonna work?! Is just a simple warning that PHP shows me!
This is my CODE Block :


// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");
// send the content type header so the image is displayed properly
header('Content-type: image/gif');


Please Help me to get rid of.

Sincerely Yours
Saman J.

Re: Problem with Headers

Posted: Mon Jun 23, 2008 7:40 am
by Kieran Huggins
is it because of your two cache-control headers? don't know if that's legal or not, but that seems like the most likely source of your error.