LucienFB Posted January 3, 2008 Share Posted January 3, 2008 My server only recognizes the <?php tag. How do I get it to recognize <? tag? Is there a setting in Apache or elsewhere to get my server to recognize the <? tag. It is only when I change every <? tag to a <?php tag that my php works. Thanks in Advance, Lucien Quote Link to comment https://forums.phpfreaks.com/topic/84258-my-server-only-recognizes-the/ Share on other sites More sharing options...
kopytko Posted January 3, 2008 Share Posted January 3, 2008 You need to change in your php.ini file short_open_tag to On. Quote Link to comment https://forums.phpfreaks.com/topic/84258-my-server-only-recognizes-the/#findComment-429108 Share on other sites More sharing options...
JamieThompson90 Posted January 3, 2008 Share Posted January 3, 2008 http://uk2.php.net/configuration Quote Link to comment https://forums.phpfreaks.com/topic/84258-my-server-only-recognizes-the/#findComment-429173 Share on other sites More sharing options...
adam291086 Posted January 3, 2008 Share Posted January 3, 2008 isn't it bad not to do <?php. I thought some browser didn't recognise <? as php Quote Link to comment https://forums.phpfreaks.com/topic/84258-my-server-only-recognizes-the/#findComment-429175 Share on other sites More sharing options...
rajivgonsalves Posted January 3, 2008 Share Posted January 3, 2008 its bad because it restricts the portability of the code Quote Link to comment https://forums.phpfreaks.com/topic/84258-my-server-only-recognizes-the/#findComment-429176 Share on other sites More sharing options...
PFMaBiSmAd Posted January 3, 2008 Share Posted January 3, 2008 Short open tags create a problem with xml inside a .php file as well, because the php parser was never made smart enough to figure out that <?xml is not a short open tag and you have to echo an xml opening tag instead of having it inline in a .php file. PHP.NET itself also recommends not using short open tags because you will end up with code that won't work on some servers and you won't always be in a position to be able to turn short open tags on - ; 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. Quote Link to comment https://forums.phpfreaks.com/topic/84258-my-server-only-recognizes-the/#findComment-429204 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.