我正在使用codigniter重定向用户后,他们已经登录到他们之前的网页。
示例URL可以是:
http://alpha.scrollr.co/app?tile=TITLE&credit=CREDIT&caption=CAPTION
下面是保存url的代码
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$this->session->set_userdata('redirect', $actual_link);
并且在用户登录后使用该文件检索该文件:
$actual_link = $this->session->userdata('redirect');
然而,我无法检索实际的链接,我在URL中有多个GET参数。
有什么想法吗
4条答案
按热度按时间a9wyjsp71#
也许我太晚了,但也许有人需要它。你可以通过urlencode和decode。例如:
而当你想取url.you时可以这样做:
对于unset,就简单的这样:
ojsjcaue2#
没有必要非常聪明,Codeigniter已经非常聪明了;
就这样做:
u0sqgete3#
如何将get变量存储到会话中。
就像这样:
然后您可以在之后UNSET它们。
c86crjj04#
如何将get变量存储到会话中?
就像这样:
然后您可以在之后UNSET它们。