Including a php file getting error ( 1007: Cannot modify...)
Posted: Mon Sep 20, 2010 4:37 pm
Hi I have a php file which a html file calls by require_once. I have found that if I include
i get the error
on line 1007: Cannot modify header information - headers already sent by (output started at
but if I include this piece of code at the top of html file it works fine. What is the reason for this? Is it perhaps that the include common.php file I'm guessing it's searching for includes header functions?
Is there anyway around it
Thanks
Thomas
Code: Select all
define('IN_PHPBB', true);
$phpbb_root_path = './phpbb/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup();
on line 1007: Cannot modify header information - headers already sent by (output started at
but if I include this piece of code at the top of html file it works fine. What is the reason for this? Is it perhaps that the include common.php file I'm guessing it's searching for includes header functions?
Is there anyway around it
Thanks
Thomas