Notice: A session had already been starte解决办法

来源:互联网 发布:may it be 编辑:程序博客网 时间:2024/05/16 08:22

Notice: A session had already been started – ignoring session_start() in .. on line ..

This happens when you try to start session more than once.

The solution for above problem is

1) in php.ini file set session.autostart to 0

session.auto_start = 0

2) In your code use this line

if (!session_id()) session_start();

instead of

session_start();

0 0
原创粉丝点击