Re: Check for start_sessoin without causing header problems
| From: | Chris Shiflett | Date: | Sat, 18 Jan 2003 22:36:12 +0000 |
| Subject: | Re: Check for start_sessoin without causing header problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-132126@lists.php.net to get a copy of this message | ||
--- SLanger@spirit21.de wrote:
> how can I call a register session from within a
> class and make sure that the session is allready
> active and if not just print a warning.
This is closely related; you can check to see whether
headers have already been sent:
http://www.php.net/manual/en/function.headers-sent.php
If they have not, it does not matter if you start the
session or use an existing one.
You can probably use session_name() to check for an
existing session. It is worth experimenting with anyway.
Chris