[PHP2.14] How do I use short open tags in my php scripts?

Short open tags are turned off in php5 scripts by default.

To get your php5 scripts to work you should change all your opening tags from "<?" to "<?php".

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

short_open_tag=1

We do not recommend this solution as the short tags can cause problems within some scripts.

Was this answer helpful?

 Print this Article

Also Read

[PHP2.07] What are the maximum file upload and timeout settings for PHP, and can I change these?

You can change these parameters using a php.ini (or php4.ini if you are using PHP4) file. Simply...

[PHP2.05] What are the correct file permissions for a PHP file?

As a general rule, the permissions of a PHP file should take one of two sets of values, either...

[PHP2.12] Can PHP5/PHP4 code be put in files with the .html/htm file extension?

It is possible to run php code in .html files by adding the following to a .htaccess...

[PHP2.03] Is PHP a CGI or Apache module?

PHP runs as a cgi at Hosting cPanel – this is because it is more secure than running it as an...