[英]PHP Session set into variable and unset it.
just a quick question. 只是一个简单的问题。
I'm trying to store a session into a variable and then in the second line I try to unset the session. 我正在尝试将会话存储到变量中,然后在第二行中尝试取消会话。 There after my variable become empty. 在我的变量变空之后。
//Assuming session Hello has a value already
$hello_world = $this->Session->read('Hello');
$this->Session->delete('Hello');
print_r($hello_world); //empty here where it shouldn't ...
try to echo the variable since it is not an array. 尝试回显变量,因为它不是数组。 if doesn't work then u have to post your whole view. 如果不起作用,那么你必须张贴整个视图。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.