Mutley Posted September 25, 2006 Share Posted September 25, 2006 I tried to do a simple include, to have my forum (SMF) included on my website.Unfortunatly I just get:[code]session_start() [function.session-start]: Cannot send session cache limiter - headers already sent[/code]I thought this was due to spaces after/before the PHP tags but I can't see any.My forum.php is just 7 lines including everything:[code]<?php$title = "Forum";$sideplans = "no";include('inc/header.php');include('forum/index.php');include('inc/footer.php');?>[/code]Any ideas? Link to comment https://forums.phpfreaks.com/topic/21989-cannot-send-session-cache-limiter-headers-already-sent/ Share on other sites More sharing options...
wildteen88 Posted September 25, 2006 Share Posted September 25, 2006 Due to the nature of what you're doing. You'll want to use output buffering. So add ob_start(); before the opening php tag and ob_end_flush(); before the closing php tag. So your code should now be like this:[code=php:0]<?phpob_start();$title = "Forum";$sideplans = "no";include('inc/header.php');include('forum/index.php');include('inc/footer.php');ob_end_flush();?>[/code] Link to comment https://forums.phpfreaks.com/topic/21989-cannot-send-session-cache-limiter-headers-already-sent/#findComment-98228 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.