Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php file with <? ?> tags in XAMPP [duplicate]

Tags:

php

Possible Duplicate:
How to enable PHP short tags ?

Hi

I have Xampp version 1.7.3. While browsing a project it shows error. This is because my php code starts with <?....?> so I want to execute my project with both the <? ..... ?> tag and <?php ....?> tag.

Thanks

like image 449
Testadmin Avatar asked Apr 09 '11 08:04

Testadmin


1 Answers

You are searching for the short_open_tag directive ;-)


To indicate PHP it should accept <? ... ?> as valid PHP tags, you must put this in your php.ini file :

short_open_tag = On

Instead of what you currently have :

short_open_tag = Off


Notes :

  • You can find out where your php.ini file is using phpinfo().
  • Generally speaking, you should not use short open tags, as those can be disabled (you've just seen that)
like image 150
Pascal MARTIN Avatar answered Sep 23 '22 19:09

Pascal MARTIN