Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable short open tag without php.ini file

Can I enable PHP short tags without touching any configuration files?

like image 642
rajanikant Avatar asked Feb 18 '10 08:02

rajanikant


People also ask

What is short open tag in PHP?

The <= tag is called short open tag in PHP.


2 Answers

If you have access to an .htaccess but not the php.ini, simply add this to .htaccess in root of the php app you are planning on running:

php_value short_open_tag 1
like image 165
Antonio Barrera Avatar answered Oct 05 '22 01:10

Antonio Barrera


You should be able to change it in your .htaccess file if it wasn't locked down

<IfModule mod_php5.c>
  php_value short_open_tag 1
</IfModule>

See http://php.net/manual/en/configuration.changes.php for more details

like image 42
Erik Giberti Avatar answered Oct 05 '22 00:10

Erik Giberti