[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.04] How do I query a MySQL database from a PHP script?

Use the following outline to connect and begin querying the MySQL server from within your PHP...

[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.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...

[PHP2.09] Does Hosting cPanel support Image::Magick?

Does Hosting cPanel support Image::Magick?