unidox Posted May 15, 2008 Share Posted May 15, 2008 I have a header redirect in an include on my page. I am getting: Warning: Cannot modify header information - headers already sent I know the header has to be at the top of the page, thats the problem. I am just wondering is there an alternative to redirect. I need to be able to redirect from the include, due to errors. Link to comment https://forums.phpfreaks.com/topic/105678-solved-header/ Share on other sites More sharing options...
DeanWhitehouse Posted May 15, 2008 Share Posted May 15, 2008 put this at the beggining ob_start(); Link to comment https://forums.phpfreaks.com/topic/105678-solved-header/#findComment-541428 Share on other sites More sharing options...
MadTechie Posted May 15, 2008 Share Posted May 15, 2008 you could use javascript or metatags ie <meta http-equiv="refresh" content="1;url=http://www.phpfreaks.com"> ie #2 echo '<meta http-equiv="refresh" content="1;url=http://www.phpfreaks.com">'; Link to comment https://forums.phpfreaks.com/topic/105678-solved-header/#findComment-541430 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.