tamir_malas Posted September 3, 2007 Share Posted September 3, 2007 Hi, what is the differance between using "<?" or using "<?php" when writing php code? because iam using a code that uses "<?" on the localhost and it is not working. what should i do? Link to comment https://forums.phpfreaks.com/topic/67749-what-is-the-differance-between/ Share on other sites More sharing options...
LemonInflux Posted September 3, 2007 Share Posted September 3, 2007 ...You could start by trying with <?php Link to comment https://forums.phpfreaks.com/topic/67749-what-is-the-differance-between/#findComment-340350 Share on other sites More sharing options...
madspof Posted September 3, 2007 Share Posted September 3, 2007 I have the same problem, I think i was told it was something to do with the phi.ini but am not sure what it is exactly. Link to comment https://forums.phpfreaks.com/topic/67749-what-is-the-differance-between/#findComment-340351 Share on other sites More sharing options...
tamir_malas Posted September 3, 2007 Author Share Posted September 3, 2007 the problem is that the code is too large to rewrite it again using "<?php" i need help to run the site using "<?" Link to comment https://forums.phpfreaks.com/topic/67749-what-is-the-differance-between/#findComment-340352 Share on other sites More sharing options...
madspof Posted September 3, 2007 Share Posted September 3, 2007 I am sorry but i cannot help you with this problem, you can try and load your code in to notepad and tell it to search for all the <? and go sistaumaticaly changing each one or you can wait for a guru to sign on Link to comment https://forums.phpfreaks.com/topic/67749-what-is-the-differance-between/#findComment-340354 Share on other sites More sharing options...
ToonMariner Posted September 3, 2007 Share Posted September 3, 2007 <? is the short tag opening effort (which in my opinion should be removed in php 6). it causes problems when you are using xml on your site and is an all round pain in the backside... if you have dreamweaver you can do a site wide search and replace - which would be my advice. alternatively you could set the short_open_tag setting in your php.ini file to On but you REALLY should use <?php Link to comment https://forums.phpfreaks.com/topic/67749-what-is-the-differance-between/#findComment-340355 Share on other sites More sharing options...
jitesh Posted September 3, 2007 Share Posted September 3, 2007 <? is sort tag <?php is full tag if in php.ini "sort_open_tag" is on then you can use <?. better to pratice to write <?php. Link to comment https://forums.phpfreaks.com/topic/67749-what-is-the-differance-between/#findComment-340357 Share on other sites More sharing options...
tamir_malas Posted September 3, 2007 Author Share Posted September 3, 2007 thank you all, problem solved. Link to comment https://forums.phpfreaks.com/topic/67749-what-is-the-differance-between/#findComment-340380 Share on other sites More sharing options...
Azu Posted September 3, 2007 Share Posted September 3, 2007 Hi, what is the differance between using "<?" or using "<?php" when writing php code? because iam using a code that uses "<?" on the localhost and it is not working. what should i do? They are exactly the same except the "<?" must be enabled in the ini to work, where as the "<?php" is enabled by default. Link to comment https://forums.phpfreaks.com/topic/67749-what-is-the-differance-between/#findComment-340383 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.