Can I enable PHP short tags without touching any configuration files?
Asked
Active
Viewed 2.5k times
5 Answers
28
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

Erik Giberti
- 1,235
- 9
- 11
4
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

Ram kiran Pachigolla
- 20,897
- 15
- 57
- 78

Antonio Barrera
- 49
- 2
4
I think the short_open_tag
can't be modified with ini_set().

Alexandru Mos
- 67
- 3
-
3"`short_open_tag` is marked as PHP_INI_PERDIR in PHP <5.3.0, which means you can't change it with `ini_set()`" http://stackoverflow.com/questions/5633301/cannot-turn-off-short-open-tag-with-ini-set – Geo Dec 26 '12 at 19:04
0
Checkout this previous Questions:
How to enable PHP short tags - Manual Setting
You can use ini_set function for setting programmatically
Revised: I try using ini_set function to configure it but failed. You can check previous questions for better answer.

Community
- 1
- 1

Joko Wandiro
- 1,957
- 1
- 18
- 28