开发者

php strange outputs before <!doctype>

I have the following pages.

index.php

<?php
require('configure.php');
?>

configure.php

开发者_开发技巧<?php
die();
?>

The above outputs a "-" (dash) when i copy it, it looks as if it's a new line or something of that nature. Its the first time i get this kind of behaviour.

The problem stands that if anything is before the the browser does not render the source properly.

any one come across this?


You may be saving your file as UTF-8. Save it as 'UTF-8 without BOM' or ASCII and the problem will be solved.

The 'Byte order mark' in UTF-8 encoding creates the problem. Use any good editor like Notepad++ and change the encoding of the files.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜