我在使用我的login.php文件時收到警告。幫助我刪除此警告......----警告:session_start()
警告:session_start()[function.session-start]:無法發送會話緩存限制器 - 已發送的頭文件(輸出在/ home開始/fundumob/public_html/app_create/index.php:35)在上線/home/fundumob/public_html/app_create/login.php 1
<?php session_start();?>
<?php
include("lib/config.php");
if(isset($_POST["tb_login"]))
{
$myusername=$_POST['log_email'];
$myuser_password=$_POST['log_password'];
if(!empty($myusername) && !empty($myuser_password))
{
$sql="SELECT * FROM act_member WHERE password='$myuser_password' and
email='$myusername'";
$result=mysql_query($sql);
// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){
$rows=mysql_fetch_row($result);
$_SESSION['user_id']= $rows[0];
$_SESSION['mem_id']=$rows[1];
$_SESSION['fname']=$rows[2];
$_SESSION['lname']=$rows[3];
header("location:profile.php"); }
else {
echo "sorry you entered wrong password or email id";
}
}
}
?>
http://www.google.com/search?q=php+headers+already+sent –
選中此項:http://stackoverflow.com/questions/8028957/warning-headers-already-sent-in- php – 2012-10-30 12:35:49