Sanjoy Roy

[MCM, MCP, SCJP] – Senior PHP Programmer

PHP Not Accepting <? Tag; Only Accepting <?php and <script> Tag


short_open_tag = boolean (php.ini file)

This ‘short_open_tag’ directive determines whether or not PHP will recognize code between <? and ?> tags as PHP source which should be processed as such. It’s been recommended for several years that you not use the short tag “short cut” and instead to use the full <?php and ?> tag combination. With the wide spread use of XML and use of these tags by other languages, the server can become easily confused and end up parsing the wrong code in the wrong context. But because this short cut has been a feature for such a long time, it’s currently still supported for backwards compatibility, but it is recommend we don’t use them.
Default Value: On
Development Value: Off
Production Value: Off

short_open_tag = On

for more info, visit: http://php.net/short-open-tag

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: