Re: session_id() how to get?
| From: | programisci_listy | Date: | Thu, 21 Mar 2002 15:49:01 +0000 |
| Subject: | Re: session_id() how to get? | ||
| References: | 1 2 3 4 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3202@lists.php.net to get a copy of this message | ||
On 21 marca 2002 at 16:23:55
Monte Ohrt <monte@ispi.net>
wrote:
> Yes, if that works!
It works. I checked.
> Be careful if you are using caching though, you don't want to cache
> a page that prints a session_id. If you don't want it cached, you'll
> have to create an insert function.
>
> $url/?SID={insert name=session_id}
Good idea. Could it be added to plugins?
<?php
/*
* Smarty plugin
* -------------------------------------------------------------
* Type: function
* Name: session_id
* Purpose: print out a session id
* -------------------------------------------------------------
*/
function smarty_insert_session_id()
{
print session_id();
}
/* vim: set expandtab: */
?>
--
Jarek