Home > Backend Development > PHP Tutorial > It seems to be a bom problem_PHP tutorial

It seems to be a bom problem_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:51:31
Original
984 people have browsed it




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...


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632554.htmlTechArticleIt seems to be a BOM problem. The error is: Cannot modify header information - headers already sent by... I am sure there is no output before the header. Use editplus to remove the bom and set it to on in phpini...
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template