[FX.php List] [OT] Bizarre comment behaviour

Tim 'Webko' Booth tim at nicheit.com.au
Thu Dec 10 20:35:00 MST 2009


Of course, about 2 minutes after posting, I found the real culprit...

> Dear All,
>
> I have been a given a server to play with. It does something very odd:
>
> It will choke on a script if it has any sort of single line  
> commenting, either // or #
>
> It will run a script if you use the /* multi-line commenting */  
> format though.
>
> Included files are not affected by this behaviour - even if they  
> have a // comment in them, they perform as expected.

Somehow, an errant high ASCII character had crept into the two lines  
that I use on nearly every php page:

	include_once('include/db_config.php');	// DataBase Configuration File.
	include_once('include/FX/FX.php');	// FX.php file

Just after the semi-colon - my other Mac servers didn't seem to care,  
but this Windows server sure does. Tested a bunch of other sites I've  
doen recently, and this set of code seems the only one affected - very  
strange, but at least explains why the behaviour went away when I  
changed it to multi-line commenting - able to use normal commetning  
again now...

Cheers

Webko


More information about the FX.php_List mailing list