-1

I am very new to PHP so if this is a wrong question sorry about it.

I am trying to run a project I have downloaded from web.

All the code in the project are written using just <? code ?> without <?php code ?>

what software should I need to install to make it run.

<?
include("../includes/commonClass.php"); 
$classObj = new commonclass;    
$postedData = $classObj->getRequestedData();    
$setsession = $classObj->validsessionSuperAdmin();      
?>
marekful
  • 14,986
  • 6
  • 37
  • 59
Moksha
  • 1,030
  • 6
  • 17
  • 38
  • 2
    You need to enable `short_open_tags` in PHP.INI. [reference](http://php.net/manual/en/language.basic-syntax.phptags.php) –  Jun 07 '15 at 07:53
  • Or you could just type *php* –  Jun 07 '15 at 07:55

2 Answers2

2

You need to enable short_open_tag, in php.ini which is disabled by default.

Because it is a setting that is disabled by default, and which can not always be enabled (some hosting companies won't allow it), it is a good idea to always use the longer <?php tag, especially if you are writing a library for others to use, or if you haven't chosen your hosting provider yet.

Note that until PHP 5.4.0, the short opening-with-echo tags <?= $value ?> was also affected by this setting, but starting from that version those tags are always available, so by now you can safely use those.

More information on PHP tags.

GolezTrol
  • 114,394
  • 18
  • 182
  • 210
1

Those are so called "short open tags" that may be used as an alternative to the normal, standard php tags. You have to enable them in your php settings, no most likely inside some php.ini file. In there look for the attribute short_open_tag and enable it (there is a description for each attribute in there).

You also want to take a look at this section of the php documentation:

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

arkascha
  • 41,620
  • 7
  • 58
  • 90