有没有在最开头加上session_start()?

解决方案 »

  1.   

    session_start()就是加上这个也不能使用
      

  2.   

    1.看看你的服务器是不是支持session。
    2.看看服务器的session.save_path的设置。
      

  3.   

    session一定要cookie支持》?
    那为什么还有session.use_cookies = 1?
      

  4.   

    救命呀,我的session就是不能使用!!!
      

  5.   

    1.phpinfo
    session
    Session Support  enabled  
    Registered save handlers  
    2.session_save_path
    (PHP 4 , PHP 5)session_save_path -- Get and/or set the current session save path
    Description
    string session_save_path ( [string path])
    session_save_path() returns the path of the current directory used to save session data. If path is specified, the path to which data is saved will be changed. session_save_path() needs to be called before session_start() for that purpose. 注: On some operating systems, you may want to specify a path on a filesystem that handles lots of small files efficiently. For example, on Linux, reiserfs may provide better performance than ext2fs. 
    See also the session.save_path configuration directive. 
      

  6.   

    http://community.csdn.net/Expert/topic/3713/3713327.xml?temp=.7228205
      

  7.   

    session 要有http头支持。看session_start()之前有没有任何输出?