Question

I am having problem with byte order mark at the top of my php file. It is like - . For this there is an php warning is showing. I have removed the text twice. but it keeps coming. My file starts like this -

<?php include('PL/header.php'); ?>

Where 'header.php' is like this-

<?php require_once("BLL/index_isNotLoggedIn_bll.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

How can I solve this?

Was it helpful?

Solution

Your IDE is probably inserting the BOM whenever you save the file. You have to configure it to save as UTF-8 without the byte order mark.

How you do this depends on your IDE, check Google if needed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top