就是简单的登录查询,把用户保存到session
@$customers_model=$customers_dal->get_customers_by_email_pwd($emailAddress, $password);
if ($customers_model!=null)//判断登录成功
{
$_SESSION["customer"]=$customers_model;
$stets=$_SESSION["customer"];
print ($stets->get_customer_email_address());
}
在当前页面能取到session 到了用户信息页就什么都没了。
if (isset($_SESSION["customer"])){
print ("存在!");
}else
{
print ("不存在!");
}
$customer_model=$_SESSION["customer"];
文件头部已经加有session_start();
D:\wamp\tmp也有对应文件。求解啊
@$customers_model=$customers_dal->get_customers_by_email_pwd($emailAddress, $password);
if ($customers_model!=null)//判断登录成功
{
$_SESSION["customer"]=$customers_model;
$stets=$_SESSION["customer"];
print ($stets->get_customer_email_address());
}
在当前页面能取到session 到了用户信息页就什么都没了。
if (isset($_SESSION["customer"])){
print ("存在!");
}else
{
print ("不存在!");
}
$customer_model=$_SESSION["customer"];
文件头部已经加有session_start();
D:\wamp\tmp也有对应文件。求解啊
检查php.ini session存放路径是否正确.
//登录
if(isset($action)&&strlen($action)>0&&$action=="login")
{
print ("123132<br>");
$_SESSION["aaaa"]="aaaa";
print ("123132<br>");
}