Pull the URL from address bar in PHP
Page 1 of 1
Pull the URL from address bar in PHP
When your writing PHP, being able to pull the address bar down from the address bar can be very handy... If you are modding the search bar in WordPress for example.
This is the code I changed to suit my Wordpress theme:
Also useful for bookmarking scripts
This is the code I changed to suit my Wordpress theme:
- Code:
<?php
$domain = $_SERVER['HTTP_HOST'];
$path = $_SERVER['SCRIPT_NAME'];
$queryString = $_SERVER['QUERY_STRING'];
$url = "http://" . $domain . $path . "?" . $queryString;
echo "" . $url . "";
?>
Also useful for bookmarking scripts
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|