1

I am having issues with XAMPP. It does not recognize php correctly. For example:

<?php echo "This is working !"; ?>

And this isn't:

<? echo "L O L"; ?>

Using XAMPP v.3.0.12

Zbarcea Christian
  • 9,367
  • 22
  • 84
  • 137

4 Answers4

6

You'll have to enable short_open_tag in php.ini

However, for compatibility reasons with system where you haven't control over the php.ini, I would not use the short open tags.

hek2mgl
  • 152,036
  • 28
  • 249
  • 266
3

That's because XAMPP has php short tags turned off. That's a good thing, as many enviroments have, as default, the same setting, and some don't let you turn it back on. But note, as of php 5.4, <?= ?> tags don't count as short tags, and can be used while short tags are turned off.

Andrew Leap
  • 956
  • 4
  • 9
2

In your php.ini there is an option for allow short tags just turn it on. It will work i.e

short_open_tag =  on
chandresh_cool
  • 11,753
  • 3
  • 30
  • 45
1

You need to do changes in php.ini file

short_open_tag = on

NOTE : Don't use short tag, It will depreciate in PHP 6

Sumit Bijvani
  • 8,154
  • 17
  • 50
  • 82