0

I have copied some code from one Linux server to my windows machine.
When i execute it i have to put <?php instead of <? for the code to run ???
is there any way to change this in wondows ?

s.mihai
  • 1,511
  • 6
  • 24
  • 27
  • 1
    If this is your code, then for the best level of compatibility you suggest that you should avoid using short open tags. It is disabled in many places. It can be problematic if you have XML files stored or used anywhere. – Zoredache Nov 22 '10 at 20:09
  • 1
    http://stackoverflow.com/questions/435705/why-is-no-longer-working-and-instead-only-php-works – Zoredache Nov 22 '10 at 20:12

1 Answers1

3

Change the short_open_tag directive in your php.ini file to On and restart your web server.

As Zoredache pointed out, for greatest compatibility you should always use <?php tags in your own code, and lobby developers who use short tags to do it properly and stop being lazy.

Ben Pilbrow
  • 12,041
  • 5
  • 36
  • 57