PHP----遇到的Session问题

使用SESSION,当跨页面使用时,会提示错误Cannot modify header information - headers already sent by。。。,

背景:使用session_start()启动了SESSION;

解决:在<a.php>发送页面的最顶端加上代码<?php  session_start();ob_start(); ?>;并在接收页面<b.php>中最上端加入代码<?php  session_start();?>


原文地址:https://www.cnblogs.com/ddx-deng/p/3755828.html