1

Topic: Including in other php page gives header error ?

I get the next error messages when i include punbb in my own php page:

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/forum/forum.php:8) in /var/www/html/forum/header.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/forum/forum.php:8) in /var/www/html/forum/header.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/forum/forum.php:8) in /var/www/html/forum/header.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/forum/forum.php:8) in /var/www/html/forum/header.php on line 34

I found that the next script couses it butt what does it do and can i remove it from headers.php without causing any problems?

// Send no-cache headers
header('Expires: Thu, 21 Jul 1977 07:30:00 GMT');    // When yours truly first set eyes on this world! smile
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');        // For HTTP/1.0 compability

HTCClub.net team thx the builders of this great forum.

Re: Including in other php page gives header error ?

Best is to load that on the page where you call the include, before you send out any HTML.