Changing the default parsing rule...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hardwarerocks
Forum Newbie
Posts: 1
Joined: Tue Nov 28, 2006 12:28 pm

Changing the default parsing rule...

Post by hardwarerocks »

I have a simple question... I am working with a customer and all of his code is missing the "php" in his opening tag "<?php " So of course his code does not work. He told me I was old school and that php3 required the php declaration after the question mark not php 5... So Is there anyway to parse the php code with just <? phpinfo();?> If so what must change in the config to support this parsing derivative?
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

1. ew
2. change it
3. you'd have to do it in the php.ini in order to allow short tags to be parsed
4. don't do number 3. that's just plain band
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Short tags are evil. Don't use them. PHP5, by default, disables short tags. I would recommend you follow suit. Do a simple find and replace in the PHP pages to change '<?' to '<?php'. That should be fast enough.
Post Reply