RichardRotterdam Posted November 4, 2006 Share Posted November 4, 2006 Hi,I just upgraded from php 5.1 to php 5.2. I have my php running under IIS.All of my php seems to work fine besides one thing. When i create a from that looks something like the following.[code]<?php$myPhpString="this is a string";?><form> <input value="<?=$myPhpString?>" /></form>[/code]instead of putting the value "[color=red]this is a string[/color]" as text in my input tag it puts <?=$myPhpString?>[/color]" /> in the textfield in my browser with tags and all.Anyone know what the the trouble could be?thnx Quote Link to comment https://forums.phpfreaks.com/topic/26160-upgrade-trouble-php-52-iis/ Share on other sites More sharing options...
wildteen88 Posted November 4, 2006 Share Posted November 4, 2006 When you upgraded you didn't turn the [b]short_open_tag[/b] directive on in the php.iniHowever I do not recommend you to rely on short tags when coding your scripts, for compatibilities sake. You should use the full tag: <?php or use <?php echo instead of <?= Quote Link to comment https://forums.phpfreaks.com/topic/26160-upgrade-trouble-php-52-iis/#findComment-119624 Share on other sites More sharing options...
RichardRotterdam Posted November 4, 2006 Author Share Posted November 4, 2006 [quote author=wildteen88 link=topic=113838.msg462914#msg462914 date=1162663034]When you upgraded you didn't turn the [b]short_open_tag[/b] directive on in the php.iniHowever I do not recommend you to rely on short tags when coding your scripts, for compatibilities sake. You should use the full tag: <?php or use <?php echo instead of <?=[/quote]What kind of compatibilities could be the problem? I use the short tags to keep my php code to a minimum in my form pages. most of my functions are build in classes to make my code more readable and maintainable Quote Link to comment https://forums.phpfreaks.com/topic/26160-upgrade-trouble-php-52-iis/#findComment-119629 Share on other sites More sharing options...
wildteen88 Posted November 4, 2006 Share Posted November 4, 2006 By compatibility I meant. If you coded your script with the short_open_tag directive enabled and you used the following tags:<? or <?=Then your scripts will fail to work or fail to function correctly when you run your scripts that had the short_open_tag directive disabled. Which is what your experiencing now when you upgraded form PHP5.1 top PHP5.2Not all PHP set ups will have the short_open_tag directive enabled.Thats why I said in order to make your scripts compatible you should use the full tags <?php instead of <? and <?php echo instead of <?= Quote Link to comment https://forums.phpfreaks.com/topic/26160-upgrade-trouble-php-52-iis/#findComment-119633 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.