PHP技术,网站开发,PHP,PHP学习,Python学习,PHP开发,人工智能,大数据服务

PHP+Python » 编程开发 » php错误:Notice: A session had already been started – ignoring session_start()

php错误:Notice: A session had already been started – ignoring session_start()

此文被围观5068日期: 2013-05-18 分类 : 编程开发  标签:  ······
今天在弄PHP自定义表单的时候出现了以下信息: Notice: A session had already been started – ignoring session_start() 说一下我的解决方法:看了一下代码,是因为session_regi...那个函数,因为现在的版本已经没有了这个函数,所以只要将其注释掉就可以了! 一下是转载网友的解决方法: 出现以下错误的解决办法: Notice: A session had already been started – ignoring session_start() in .. on line .. 之所以出现这种情况是页面中多次使用了 session_start()函数 有以下两种解决办法: 1) in php.ini file set session.autostart to 0 配置php.ini 设置session.autostart =0 session.auto_start = 0 2) In your code use this line 在出现错误的页面中编辑你的代码如下: if (!session_id()) session_start(); instead of session_start();

© Copyright 2011-2019 adophper.com. All Rights Reserved.
读图网科技 版权所有。蜀ICP备12031064号