0

I've some little older PHP coded websites lying around, starting their PHP code with <? instead of <?php. I just started migrating these websites to my new server with PHP 5.6 installed. Now my PHP code just displays as text and the webserver doesn't interpret it as PHP code anymore. Is there a simple fix for this or do I need to replace all <? tags with <?php?

Thanks in advance!

NikiC
  • 100,734
  • 37
  • 191
  • 225
Daniel Gelling
  • 892
  • 1
  • 9
  • 22
  • "[PHP also allows for short open tag ](http://php.net/manual/en/language.basic-syntax.phptags.php) (which is discouraged since it is only available if enabled using the short_open_tag php.ini configuration file directive, or if PHP was configured with the --enable-short-tags option)" – D4V1D Apr 02 '15 at 19:23

1 Answers1

3

Short tags have been disabled on your new server. You need to enable it again in your php.ini file. Your host may also allow you to modify it in an .htaccess file:

php_flag short_open_tag on
John Conde
  • 217,595
  • 99
  • 455
  • 496