kushal275 Posted November 15, 2014 Share Posted November 15, 2014 Hi guys, guys, i am trying to put the PHP code in the header.tpl but its not working at all, please help me with this, i am trying to put the below code <?php $uri = $_SERVER['REQUEST_URI']; if ( strpos($uri,'us.xyz.com') !== false ) { echo '<img src="images/us.png"'>; } elseif ( strpos($uri,'in.xyz.com') !== false ) { echo '<img src="images/in.png"'; } elseif ( strpos($uri,'au.xyz.com') !== false ) { echo '<img src="images/au.png"'; } else { echo 'unknown uri'; } ?> 0 Quote Link to comment Share on other sites More sharing options...
freemind Posted November 15, 2014 Share Posted November 15, 2014 Use like this {php} $uri = $_SERVER['REQUEST_URI']; if ( strpos($uri,'us.xyz.com') !== false ) { echo '<img src="images/us.png"'>; } elseif ( strpos($uri,'in.xyz.com') !== false ) { echo '<img src="images/in.png"'; } elseif ( strpos($uri,'au.xyz.com') !== false ) { echo '<img src="images/au.png"'; } else { echo 'unknown uri'; } {/php} 0 Quote Link to comment Share on other sites More sharing options...
mbit Posted November 15, 2014 Share Posted November 15, 2014 http://docs.whmcs.com/Template_Syntax#Using_PHP_Code_within_Templates 0 Quote Link to comment 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.