doudong4532 2013-12-19 15:04
浏览 74
已采纳

带有BOM的文件格式UTF8导致“已发送标头” - 错误[重复]

This question already has an answer here:

I've got this error message:

Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/---/dbconnect.php:1) in /Applications/MAMP/htdocs/---/functions.php on line 84

This is dbconnect.php:

<?php if(!defined("INC")){
  define("INC", 1);
}
error_reporting(E_ALL);
require_once("config.mysqli.php");
@$mysqli = mysqli_connect($dbhost,$dbuser,$dbpass,$dbname) or die("No Db found");?>

Also tried:

<?php ob_start(null);
if(!defined("INC")){
  define("INC", 1);
}
error_reporting(E_ALL);
require_once("config.mysqli.php");
@$mysqli = mysqli_connect($dbhost,$dbuser,$dbpass,$dbname) or die("No Db found");
ob_end_clean();?>

Please let me know if you need any more inormation. Thanks!

</div>
  • 写回答

1条回答 默认 最新

  • doumalu9257 2013-12-19 15:18
    关注

    Looks like you might have the BOM error. See this post for more info: session_start() Error

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 vue3+element-plus页面崩溃
  • ¥15 像这种代码要怎么跑起来?
  • ¥15 怎么改成循环输入删除(语言-c语言)
  • ¥15 安卓C读取/dev/fastpipe屏幕像素数据
  • ¥15 pyqt5tools安装失败
  • ¥15 mmdetection
  • ¥15 nginx代理报502的错误
  • ¥100 当AWR1843发送完设置的固定帧后,如何使其再发送第一次的帧
  • ¥15 图示五个参数的模型校正是用什么方法做出来的。如何建立其他模型
  • ¥100 描述一下元器件的基本功能,pcba板的基本原理