Home >Backend Development >PHP Tutorial >It seems to be a bom problem_PHP tutorial
It seems to be a BOM problem
The error is: Cannot modify header information - headers already sent by ……
I’m sure there is no output before the header
Use editplus to also remove bom
phpini is also set to on
Ob_start
was also added before
Nothing works [img]http://www.111cn.cn/bbs/images/smilies/default/mad.gif[/img]
Is there any other way?
Best answer[url=http://www.111cn.cn/bbs/space.php?username=qxhy123]Link tag qxhy123[/url]
[url=http://www.111cn.cn/bbs/space.php?uid=66514]Link tag[img]http://www.111cn.cn/server/avatar.php?uid=66514&size=small[ /img][/url]require_once('db.php');
Please comment out this sentence and take a look. It is probably because the BOM in db.php has not been removed. There is no problem with your code here.
D8888D reply content------------------------------------------------- ----------
require_once('db.php');
Please comment out this sentence and take a look. It is probably because the BOM in db.php has not been removed. There is no problem with your code here.
D8888D reply content------------------------------------------------- ----------
Girl, please post the code and take a look
D8888D reply content------------------------------------------------- ----------
//fireseno worked at Fri Mar 06 23:29:07 CST 2009
session_start();
require_once('db.php');
//print_r($_POST);
$num=mysql_query("select user,pass from user");
while ($run=mysql_fetch_assoc($num)) {
if ($_POST['name']===$run['user']&&md5($_POST['name2'])===$run['pass']) {
$_SESSION['userid']=$_POST['username'];
header("location: lo.php");
die();
}else {
header("location: msg.php");
}
}
ob_end_flush();
?>
Copy code
D8888D reply content------------------------------------------------- ----------
There is no problem with db. .
depressed! !
I just re-wrote the code and it's fine again. .
I wonder if something will go wrong again soon...