Session_start()[function.session-start]:无法发送会话缓存限制器 - 已发送的标头

时间:2013-09-20 00:05:55

标签: php session

我已经检查了一些关于我的相同问题的话题,并尝试解决它,但仍然不能。我希望有人可以帮助我。

<?php
include('pageprotect.php');
$id = $_SESSION["username"];
?>

以上代码位于我的某些页面上方。

<?php session_start();
if(!isset($_SESSION['username'])){
    header("location:index.html");
}
?>

这是pageprotect.php的代码 当我尝试运行此页面时,它显示

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\Software Data\Xampp 1.7.3\xampp\htdocs\FOS\mobile\plosurveyg.php:1) in D:\Software Data\Xampp 1.7.3\xampp\htdocs\FOS\mobile\pageprotect.php on line 2

除此之外,在除此之外的相同代码的其他页面上没有问题。

我不知道问题是什么,抱歉我的英语。 &GT;。&LT;谢谢你的帮助

0 个答案:

没有答案
相关问题