hakmir Posted November 3, 2008 Share Posted November 3, 2008 <?php works but <? doesn't work. I don't know why it is behaving that way. I have the latest version of wamp server. can you help? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/131224-solved/ Share on other sites More sharing options...
NathanLedet Posted November 3, 2008 Share Posted November 3, 2008 I do believe this is a setting in your php.ini http://us3.php.net/ini.core Quote Link to comment https://forums.phpfreaks.com/topic/131224-solved/#findComment-681276 Share on other sites More sharing options...
kenrbnsn Posted November 3, 2008 Share Posted November 3, 2008 There is a setting in the php.ini file that controls that which is "short_tags", but just get used to typing "<?php" instead of "<?", it's only three more characters. Also, using "<?php" will guarantee your script will work on all servers. Ken Quote Link to comment https://forums.phpfreaks.com/topic/131224-solved/#findComment-681278 Share on other sites More sharing options...
hakmir Posted November 3, 2008 Author Share Posted November 3, 2008 That's a good idea. But I have some study materials and almost all of them has <? instead of <?php. I will still use <?php but How can I change the setting so that it will recognize <? too. I checked php.ini file but couldn't do it. Quote Link to comment https://forums.phpfreaks.com/topic/131224-solved/#findComment-681286 Share on other sites More sharing options...
Prismatic Posted November 3, 2008 Share Posted November 3, 2008 Not very good material IMO Quote Link to comment https://forums.phpfreaks.com/topic/131224-solved/#findComment-681289 Share on other sites More sharing options...
Maq Posted November 3, 2008 Share Posted November 3, 2008 I think it's 'short_open_tag'. I would highly recommend that you do not use short tags. It's not good for portability reasons and it's just not good practice. I don't even know why they have this option in the first place... Quote Link to comment https://forums.phpfreaks.com/topic/131224-solved/#findComment-681294 Share on other sites More sharing options...
hakmir Posted November 3, 2008 Author Share Posted November 3, 2008 I solved the problem. Thanks a lot. short_open_tag = On Quote Link to comment https://forums.phpfreaks.com/topic/131224-solved/#findComment-681298 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.