Re: session_id() how to get?
| From: | programisci_listy | Date: | Thu, 21 Mar 2002 15:10:25 +0000 |
| Subject: | Re: session_id() how to get? | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3190@lists.php.net to get a copy of this message | ||
On 21 marca 2002 at 15:50:14
Monte Ohrt <monte@ispi.net>
wrote:
> One solution would be to drop in a plugin:
> function.sessionid.php
> ----------------------
> function smarty_function_sessionid() {
> echo session_id();
> }
But {$smarty.request.sid} is easer, isn't it? :)
It is also interesting that all following do not work:
{$smarty.get.sid}
{$smarty.post.sid}
{$smarty.cookies.sid}
{$smarty.server.sid}
{$smarty.env.sid}
{$smarty.session.sid}
They return null.
Only {$smarty.request.sid} gets session id. So it might be not true that
<cite from="manual">
{* display the variable "username" from merged get/post/cookies/server/env *}
{$smarty.request.username}
</cite>
--
Jarek