If I write php code <?php Then my php code ?> It is running fine But when I am trying with <? Then my php code ?> Php is not running. I know there I need to change some setting in php.ini. But I don't know where and what I have to write there. PLs help me asap. I am facing lots of problem with this. Thanks, Subikar
1. quote from my PHP.ini 2. the setting is in your system's php.ini normal would be short_open_tag = Off if you really want to use short tags then apparently you would have to short_open_tag = On
For security it is always a good idea to use long open tags : <?php .... PHP: Long open tags always work, short open tags only when configured. Your code might work now with short open tags, but suppose your hoster changes the server settings. Your PHP will not be executed, but exposed to the outside world because the source will be served like a text page. Imho using short open tags means taking unnecessary risks.