Hardik Soni
Hardik Soni

Reputation: 71

php 5.3 CLI junk characters

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

Upvotes: 3

Views: 605

Answers (1)

Carlos Campderr&#243;s
Carlos Campderr&#243;s

Reputation: 23002

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).

Upvotes: 4

Related Questions