How do I use short open tags in my PHP scripts?


Short open tags are not recommended in PHP scripts, as they can cause problems in some scripts.

As a result, if your scripts have the “<?” open tag rather than “<?php”, we recommend that you change them to “<?php”.  You should also remove the “?>” at the end of your file to stop the parser from output buffering.

If you do not want to edit all your scripts, an alternative solution (which is not recommended) is to add the following line to your php5.ini file:

short_open_tag=1

This will allow your scripts to work with short open tags.



Article ID: 427
Created On: Mon, Mar 16, 2015 at 3:40 PM
Last Updated On: Thu, Apr 23, 2015 at 12:20 PM

Online URL: https://www.heartinternet.uk/support/article/how-do-i-use-short-open-tags-in-my-php-scripts.html