-1

hi all,

I'm using dreamweaver templates to make my site, however when I want to use the session_start(); function in php, the headers have already been sent because dreamweaver writes the following into the page:

<!-- InstanceBegin template="/Templates/index.dwt.php" codeOutsideHTMLIsLocked="false" -->

and so I am having to put in the session_start function manually at the top of every page before the above code. Is there any way to get around this?

Thanks in advance!

Max.

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by scru
0

No. Session start must always come before headers are sent, and that means before that code there.

0

damn. okay thanks anyway :)

Forgot to add, you could have written it like:

<?php session_start(); ?>
<!-- InstanceBegin template="/Templates/index.dwt.php" codeOutsideHTMLIsLocked="false" -->
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.