note 12931 deleted from ref.session by yohgaki
| From: | yohgaki@php.net | Date: | Sat, 19 Jan 2002 06:44:49 +0000 |
| Subject: | note 12931 deleted from ref.session by yohgaki | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25117@lists.php.net to get a copy of this message | ||
here's a quick note to save others the same pain i have been through with this:
<BR>if you output *anything* before calling session_start() (or session_register()), you will
get an ugly warning at the top of your page saying the headers have already been sent. you may also
get a warning about not being able to send cookies after the headers have been sent. this will
happen even if you have a blank line above your <? tag because that is interpreted as the
beginning of page output. if you are using sessions, save yourself some agony and start your page
like this:<BR>
-----
<?
session_start();
// rest of code...
?>