Re: A stupid question?
| From: | David Wonderly | Date: | Fri, 18 Jan 2008 06:03:43 +0000 |
| Subject: | Re: A stupid question? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267528@lists.php.net to get a copy of this message | ||
On Fri, 2008-01-18 at 10:54 +0800, Shelley Shyan wrote:
> Hi all,
>
> Maybe this is a somehow stupid question.
>
> I want to know how php could know whether session_start() has been called, that is, whether
> session has been started.
>
> I Googled, but got little help.
>
> Thank you for help!
> Any tip is greatly appreciated.
>
> Regards,
> Shelley
>
Hey Shelley, maybe I can help you understand Sessions. When you start a
Sessions PHP creates a Session ID. This is then used to create/Store
information in a file or in a database. The configuration of this is in
your php.ini file. If this file you can change where the session is
saved as well as other options. A simple way to use Sessions is with
cookies with the session.use_cookie = 1 in the php.ini file. However, if
the client doesn't allow cookies there is a second way;
session.use_trans_sid = 0 there are a few problems however, it creates a
security risk.
Anyway, I hope this opens a little on how sessions works. If you wish to
learn more about sessions go to http://us2.php.net/session
or
http://w3schools.com/php/php_sessions.asp
David Wonderly
WebGenero