|
Subject:
|
fixing the 'headers already sent' warning/error
|
|
Posted By:
|
ire
|
Post Date:
|
8/19/2006 7:20:04 AM
|
I'm sure this is a common problem and while I have found some answers to this question, I have a slightly different scenario here: My index.php code requires my header.php file- which calls the session_start() function. The header.php comes in within the div element and simply goes: ... <body> <div id="wrapper"> <?php require("header.php"); ?> </div> ... with this arrangement, I get the error- "Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by..." twice in a row. My presentation logic is a three column layout in a wrapper. Placing the above php code at the top does work, but also defeats the purpose of my box model. What please is the best way out. Thanks
|
|
Reply By:
|
hymns
|
Reply Date:
|
8/21/2006 7:35:49 AM
|
session_start() must put before <html><head>... tags.
|
|