943,847 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 2775
  • PHP RSS
Oct 18th, 2008
-1

using dreamweaver templates with session_start

Expand Post »
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:

PHP Syntax (Toggle Plain Text)
  1. <!-- 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.
Reputation Points: 32
Solved Threads: 3
Posting Whiz in Training
MaxMumford is offline Offline
228 posts
since Oct 2006
Oct 18th, 2008
0

Re: using dreamweaver templates with session_start

No. Session start must always come before headers are sent, and that means before that code there.
Featured Poster
Reputation Points: 975
Solved Threads: 140
Posting Virtuoso
scru is offline Offline
1,624 posts
since Feb 2007
Oct 19th, 2008
0

Re: using dreamweaver templates with session_start

damn. okay thanks anyway
Reputation Points: 32
Solved Threads: 3
Posting Whiz in Training
MaxMumford is offline Offline
228 posts
since Oct 2006
Oct 19th, 2008
0

Re: using dreamweaver templates with session_start

Click to Expand / Collapse  Quote originally posted by MaxMumford ...
damn. okay thanks anyway
Forgot to add, you could have written it like:
php Syntax (Toggle Plain Text)
  1. <?php session_start(); ?>
  2. <!-- InstanceBegin template="/Templates/index.dwt.php" codeOutsideHTMLIsLocked="false" -->
Featured Poster
Reputation Points: 975
Solved Threads: 140
Posting Virtuoso
scru is offline Offline
1,624 posts
since Feb 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Need Immediate Help With PHP
Next Thread in PHP Forum Timeline: PHP Scripts





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC