It seems my server is not responding to <?
, and needs <?php
. How can I make it recognise <?
as well?
// On:
php_flag short_open_tag on
// Off:
php_flag short_open_tag off
The short_open_tag
is what is classified as PHP_INI_PERDIR which means that it can be set in php.ini, .htaccess, httpd.conf or .user.ini (since PHP 5.3). You can't use ini_set()
. A phpinfo()
will tell you whether you are using mod_php5 (in which case you can use the php_flag directive or using suEXEC/suPHP/FastCGI in which case you can use php.ini or .user.ini to set this.
However as hakre says, it is better to bet out of the habit of using short tags.