首页 > 代码库 > Notice: A session had already been starte 解决办法

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

看文字就知道是已经执行了

一般是因为执行了两次session_start();或者类似的操作

解决方法

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();

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