PHP学习_PHP技术_PHP网站建设_PHP程序员专注于PHP技术研究及学习

Adophper » 编程开发 » php Notice: A session had already been starte解决办法

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

此文被围观2342日期: 2014-08-11 分类 : 编程开发  标签:  ··

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

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

代替

session_start();


本站使用ThinkPHP框架开发读图网主题,目前托管在阿里云,图片由读图网提供. 蜀ICP备12031064号

Copyright © 2011-2018adophper.com All Rights Reserved.