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

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

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

此文被围观4005日期: 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();

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

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