FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Some times, the error is so hard to find and so funny





Mgccl
You know... like days ago... I got a problem with header pharsing...
And I'm ceartain!!!! nothing is wrong with my script... it produces NO OUTPUT by echo, print or white space before <?php or after ?>
Then that is wrong?
This is one of those errors I found sooo hard to find... and when I found what cause the problem... I feel want to langh...
The problem is I use UTF encoding for my PHP file while my server using GB2132 encoding, and it prases "<" into an out put.
it cost me 2 days on trying find why...
And at last... some noob PHP guy see my code and say he sees ??php not <?php because he is using a editor does not support UTF....
and that solves my problem...
MY GOD... I posted this question in like all the biggest PHP forum I can find....
And the answer is soooooo unbeliveable hard to think of....



Any one here got something like that? very strange error and very stange cause for that error
hexkid
Mgccl wrote:
The problem is I use UTF encoding for my PHP file while my server using GB2132 encoding, and it prases "<" into an out put.


I believe the real problem must have been the BOM (byte order mark), not the fact that you have the PHP file encoded in UTF-8 per se. If you keep your file encoded with UTF-8 but remove the BOM the problem will likely go away.

Of course reading a file encoded with UTF-8 as if it was encoded with GB2132 (or any other encoding) will probably give you all sorts of other errors ...
Related topics
What is your favourite movie?
When you need somebody
porn virus
Should rich people give away their money?
Sorry to break a forum rule. A new language thread.
Store all your data on Google servers
Teach your kids these two things please
Mother
Do people actually read posts or just reply to get points?
Are (Radical) Muslims Stupid?
Electrical engineering
Favorite Cartoon growing up as a kid?
National Institute for Civil Discourse - what ever for?
The big bang theory season 5
A not so funny observation
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.