I have 2 two php pages.One is the main and include the second and i want to add an expires header to it but i get the following error
Warning: Cannot modify header information -
headers already sent by (output started at..
In the first one
ob_start('ob_gzhandler', 6);
/// lots of html here
include("pageTwo.php");
/// lots of html here
ob_end_flush();
In the second page
ob_start();
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + 3600));
/// lots of html here
ob_end_flush();
Don’t use mode
6and try to do it naked prior to applying compression.