John Davidson

php - if ($_SERVER['HTTP_HOST'] on smarty template .tpl

0 comments
Message:


I usually use php to show some code on spesific domain like this


    if ($_SERVER['HTTP_HOST'] == 'myexamdomain.com') {
...
}

How to use that on smarty template .tpl ?


I have try like this but it does not work.


    {if $smarty.server.HTTP_HOST == "myexamdomain.com"}
...
{/if}


My Answer:
'REQUEST_METHOD'] == 'POST') {
// Form was submitted via POST method
// Process form data here
} else {
// Form was not submitted via POST method
// Display form here
}

Rate this post

3 of 5 based on 1564 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us