GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   CODERS: Do NOT let clients use Expression to modify php files! (https://gfy.com/showthread.php?t=943592)

k0nr4d 12-15-2009 02:35 PM

CODERS: Do NOT let clients use Expression to modify php files!
 
I'm posting this up to save any other coders a very very long search through lots of code...

Microsoft Expression inserts an invisible mark called a 'byte order mark (http://en.wikipedia.org/wiki/Byte-order_mark)'. It causes the php scripts to output ? at the end of files, but its invisible in the code even in other editors. The only way to see it is if you output something before the byte order mark was inserted:

In my case, my client opened the scripts config file, changed something and saved it (thus inserting this invisible mark that even i couldn't see in another editor afterwards).

<?
include('config.php');
?>

Outputted nothing, whereas

<?
echo 'test';
include('config.php');
?>

Would output "test?", yet config.php itself had no output at all.

So in summary, if you are experiencing mysterious code problems and are convinced you have gone mad, ask if someone using expression has edited your code :)

borked 12-15-2009 02:48 PM

I bet you figured that one out within no time ;)

Thanks for the heads up.

FWIW, Coda removes byte order marks on every save if saving as unicode (utf-8 no BOM)

Also, don't BOM's show up when viewing invisible characters? I've always found the root of many an obscure problem by viewing invisible characters and looking for things "out of the ordinary"

nation-x 12-15-2009 05:08 PM

Is that the ^M crap? There are alot of editors and ftp programs that add that crap on windows.

AIbenjamink 12-15-2009 05:48 PM

Have yet to experience this, but thanks for the heads up:thumbsup

Adam X 12-15-2009 06:15 PM

konrads the man..

ahh the acursed invisible chars.. reminds of old apple ][+ days...


All times are GMT -7. The time now is 02:37 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123