php 5.3 CLI junk characters

这一生的挚爱 提交于 2019-12-23 22:19:14

问题


I am facing problem like whenever I run a simple php script from the command line, it is showing some junk character before it.

I am using php 5.3.9 on wamp server on windows 7.

Here is my code of my script

<?php
echo "Hi"; exit;
?>

and here is what i get in cli

Hi

Let me know if anyone else has faced same like problem and know the solution.

Thanks


回答1:


This is the UTF-8 BOM. In your editor, save the file as 'UTF-8 without BOM' (look for that setting, it must be there somewhere. If you can't find it, change your editor).



来源:https://stackoverflow.com/questions/13798455/php-5-3-cli-junk-characters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!