File format UTF8 with BOM caused "headers already sent"-error

Viewed 893

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!

1 Answers
Related