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 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. 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 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 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! Link to comment https://forums.phpfreaks.com/topic/98922-difference-between/#findComment-506147 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.