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.
Problem with Headers
Moderator: General Moderators
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: Problem with Headers
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.