-1

警告:session_start() [function.session-start]:无法发送会话缓存限制器 - 标头

已经发送(输出开始于 /home/scalepro/public_html/Admin ......................实际上没有空间和输出但仍然显示上述错误消息。

这是代码:

<?php 
ob_start();session_start();
?>
<html>
<head>
</head>
<body>
<?php
require_once('../../Admin Panel/db.php');
if(isset($_POST['email']) && !empty($_POST['email']) && isset($_POST['password']) && !empty($_POST['password']))
{
 $email = $_POST['email'];
 $password = $_POST['password'];
 $query="SELECT RemoteEmployeeFullName, RemoteEmployeeEmail, RemoteEmployeePassword FROM remoteemployees WHERE RemoteEmployeeEmail='".$email."' AND RemoteEmployeePassword='".$password."'";
 $queryrun=$connection->query($query);
       if($queryrun->num_rows > 0)
       {
           $_SESSION['email']=$RemoteEmployeeFullName;
           echo '<META HTTP-EQUIV="Refresh" Content="0; URL=REPLists.php">';    
           exit();
       }
       else
       {
           echo 'Email: <b>'.$email. '</b> or Password <b>'. $password.'</b> Is Not Typed Correctly Try Again Please!.';
           echo '<META HTTP-EQUIV="Refresh" Content="5; URL= ../../spd/myaccount.php">';
           exit();
       }

}
else
{
    echo '<META HTTP-EQUIV="Refresh" Content="5; URL= home/scalepro/public_html/spd/myaccount.php">';
    exit();
}?>
</body>
</html>
4

2 回答 2

1

确保在这些行之前没有任何内容输出到浏览器,并从该代码中删除任何不必要的空格。

于 2013-06-27T05:25:45.113 回答
0

检查你的require_once('../../Admin Panel/db.php');文件。如果会话在此文件中启动,那么您需要将其包含在HTML标签上方。

于 2013-06-27T05:26:42.333 回答