1

Possible Duplicate:
How to enable PHP short tags ?

I am using

Apache Friends XAMPP (Basis Package) version 1.7.3
  • Apache 2.2.14 (IPV6 enabled)
  • MySQL 5.1.41 (Community Server) with PBXT engine 1.0.09-rc
  • PHP 5.3.1 (PEAR, Mail_Mime, MDB2, Zend)

and i am running php files, that i code with <? ?> tags not <?php ?>. but the apache server won't execute my code, but if i try with <?php ?> tags, the code works. Anyone know how to enable the server to execute php code with <? ?> tags ?

Community
  • 1
  • 1
ayublin
  • 1,855
  • 17
  • 25
  • 2
    Why don't you use ` – zerkms Jan 15 '11 at 03:36
  • Its best to not use short tags though, they are on the way out, and you will someday have to go and change them all. – profitphp Jan 15 '11 at 03:37
  • You can enable the short tags, but take it as a sign that you'll have to start updating your code: short tags are deprecated and could vanish in any future version of PHP, leaving you with a large pile of unusable code. – Marc B Jan 15 '11 at 03:37
  • @Marc B: Short tags are not deprecated, although I agree they should not be used. – netcoder Jan 15 '11 at 03:40
  • @jasonbar: ohh yeah, it's also answer to my problem, sorry i didn't realized it's existencene before, should i delete this ? @all: ohh, well, thank you very much everyone, i don't know if it's deprecated, so it's better for me change everything before it's too late.. once again thanks! – ayublin Jan 15 '11 at 03:43
  • Ah, I see now that the decision was made to leave them in. Good enough. Thanks for getting me to go look. – Marc B Jan 15 '11 at 03:45
  • @Marc B: They might not be deprecated but that they are disabled by default is a strong sign not to use them. – Felix Kling Jan 15 '11 at 03:48

1 Answers1

5

you need to configure you php.ini fiile and set short_open_tag to 1

source: http://php.net/manual/en/ini.core.php

amosrivera
  • 26,114
  • 9
  • 67
  • 76
  • Well, he **needs** to stop using short tags. This is just a temporary workaround until the ability to use them disappears entirely. – ceejayoz Jan 15 '11 at 03:49