Forum Moderators: coopster

Message Too Old, No Replies

without the word php Problem

"<?" and "<?php"

         

ashii

4:20 pm on Feb 20, 2008 (gmt 0)

10+ Year Member



I came across a apache with PHP5 server
which will not recognize PHP code written inside"<?"
(without the word php)

I notice if we change to "<?php" it works fine.
is it a server BUG or its becoming a scripting standard now days?
Is there way to solve this without changing all our scripts"

jatar_k

4:35 pm on Feb 20, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it's a setting in php.ini

[php.net...]

henry0

5:50 pm on Feb 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need changing them all before php6
that will not allow for short tag on or off

Dexie

9:38 pm on Feb 20, 2008 (gmt 0)

10+ Year Member



Just to confirm, in all php code, you'll need <?php at the beginning of the code ?

Dexie

eelixduppy

9:44 pm on Feb 20, 2008 (gmt 0)



As long as you don't have the short tags directive set to allow the shorter for of the opening tag.

londrum

9:48 pm on Feb 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



people says it's best to stick with good'ol <?php to avoid future annoyances, like the one you're having now.
it can get confusing if you ever switch over to xml as well, because that uses <? too.

ashii

2:03 pm on Feb 21, 2008 (gmt 0)

10+ Year Member



Yes,Perhaps its good to use <?php now onwards
Between I solved it using .ini settings for now