jmcall10 Posted April 1, 2008 Share Posted April 1, 2008 Hi all, I was wondering if someone could answer this question for me? I recently installed a small php app. It would not work until I changed <? into <?php I thot it was the same thing? Can someone tell me why this is? Thanks in advance jmcall10 Quote Link to comment https://forums.phpfreaks.com/topic/98922-difference-between/ Share on other sites More sharing options...
JD* Posted April 1, 2008 Share Posted April 1, 2008 Depends on what is in your PHP.ini. The <? are called "short tags" and in some cases are switched off for added security, thus you must use <?PHP. Quote Link to comment https://forums.phpfreaks.com/topic/98922-difference-between/#findComment-506138 Share on other sites More sharing options...
dbillings Posted April 1, 2008 Share Posted April 1, 2008 It's a setting that is adjustable in the php.ini configuration file.... ; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized. ; NOTE: Using short tags should be avoided when developing applications or ; libraries that are meant for redistribution, or deployment on PHP ; servers which are not under your control, because short tags may not ; be supported on the target server. For portable, redistributable code, ; be sure not to use short tags. short_open_tag = Off Quote Link to comment https://forums.phpfreaks.com/topic/98922-difference-between/#findComment-506139 Share on other sites More sharing options...
jmcall10 Posted April 1, 2008 Author Share Posted April 1, 2008 thank you guys for your response If I develope any apps i will use the <php Thanks Can now close thread Quote Link to comment https://forums.phpfreaks.com/topic/98922-difference-between/#findComment-506144 Share on other sites More sharing options...
coder_ Posted April 1, 2008 Share Posted April 1, 2008 You mean <?php ?> Mark topic as solved! Quote Link to comment https://forums.phpfreaks.com/topic/98922-difference-between/#findComment-506147 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.