鍍金池/ 問答/PHP  數(shù)據(jù)庫/ 在smarty的模板中怎么取cookie呢?

在smarty的模板中怎么取cookie呢?

我在php代碼中可以通過下面的方式取cookie:

$_COOKIE['qicloud_access_token']

但是在smarty的模板中怎么取cookie呢?

回答
編輯回答
枕頭人
{* display the value of the cookie "username" ($_COOKIE['username']) *}
{$smarty.cookies.username}

https://www.smarty.net/docs/z...

2018年5月22日 22:49