Re: session_id() how to get?
| From: | programisci_listy | Date: | Thu, 21 Mar 2002 14:35:21 +0000 |
| Subject: | Re: session_id() how to get? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3181@lists.php.net to get a copy of this message | ||
On 21 marca 2002 at 15:30:29
Andrei Zmievski <andrei@ispi.net>
wrote:
>> I want to use session_id() in Smarty but I do not know how to get it
>> directly.
>> {$smart.session.variable} works with session variables, not
>> with the id. I need it to add to my urls.
>
> If you use default sessions name (PHPSESSID), you can access it as
> {$smarty.cookies.PHPSESSID} or {$smarty.get.PHPSESSID} depending on
> which way it's passed.
It does not work. :-(
file:
{php}
print session_name()."=".session_id()."<br />";
{/php}
({$smarty.cookies.PHPSESSID})({$smarty.cookies.sid})
output:
sid=67d8a7a3caeb5ce0fb43eb3e37897db6
()()
--
Jarek