Obtain Site Domain Name in PHPSometimes you want to automatically obtain the site domain name in PHP. This technique means you don't have to hard code references to the site domain name in your script, making it easier for your script to be used on other sites. E.g. if the url of your script was: http://www.mysite.co.uk/show-review.php and you wanted to put the site domain into a variable, i.e. put www.mysite.co.uk into a variable, the code to use would be: <?php
|
|
All Content ©2020 WebRef.eu |