就是简单的登录查询,把用户保存到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也有对应文件。求解啊

解决方案 »

  1.   

    有报什么错误吗?
     检查php.ini session存放路径是否正确.
      

  2.   

    没有报错 。  session.save_path = "d:/wamp/tmp"   难道是文件访问权限问题?
      

  3.   

    郁闷了。写了个测试$_SESSION["aaaa"]="aaaa";放在IF外就有,里面j就没。。
    //登录
    if(isset($action)&&strlen($action)>0&&$action=="login")
    {
    print ("123132<br>");
    $_SESSION["aaaa"]="aaaa";
    print ("123132<br>");
    }
      

  4.   

    先不要跳转,输入路径试下,我以前遇到过,就是跳转的时候的问题,还有路径不要用localhost,用127.0.0.1
      

  5.   

    localhost 就没用 一定要127.0.0.1才行