New Coder Posted January 5, 2010 Share Posted January 5, 2010 Hello All, My site has been moved from a production server, to a desktop running vista and iis7 for testing and upgrading. All works currently except one item: <body style="background:url(images/<?php rand(1,5).".jpg"; ?>) no-repeat fixed bottom right;"> However if I add echo like: <body style="background:url(images/<?php echo rand(1,5).".jpg"; ?>) no-repeat fixed bottom right;"> it works again Why is that? the first example works fine on the production server... Am i missing a setting in IIS? I have checked the MIME types. Many Thanks Link to comment https://forums.phpfreaks.com/topic/187244-server-move-strange-problem/ Share on other sites More sharing options...
monkeypaw201 Posted January 5, 2010 Share Posted January 5, 2010 It sounds like your production server has short_open_tag() enabled in the PHP.INI and your IIS doesn't. "[echo()] has a shortcut syntax, where you can immediately follow the opening tag with an equals sign. This short syntax only works with the short_open_tag configuration setting enabled. " (http://php.net/manual/en/function.echo.php) Link to comment https://forums.phpfreaks.com/topic/187244-server-move-strange-problem/#findComment-988824 Share on other sites More sharing options...
New Coder Posted January 5, 2010 Author Share Posted January 5, 2010 Aha I see. Spot on. Many Thanks Link to comment https://forums.phpfreaks.com/topic/187244-server-move-strange-problem/#findComment-988828 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.