Problem with Headers
Posted: Mon Jun 23, 2008 7:17 am
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.
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.