这是代码:
final public function login($email) {
$this->email = mysql_real_escape_string($email);
$this->q = "SELECT id FROM users WHERE mail = '$this->email'";
$this->r = mysql_query($this->q);
$this->id = mysql_result($this->r, 0);
$_SESSION['id'] = "$this->id";
header('Location: me.php');
exit;
}
我不确定当我重定向会话时不会留下来。我已经在当前页面上回应了它,它显示了。有什么解决办法吗?我有一个全局命名空间,因此会话设置在所有文件中。