Do Your Code
Sunday, March 31, 2013
How to get full url link in PHP?
$_SERVER['HTTP_HOST']
= This will return server name from the URL.
$_SERVER['REQUEST_URI']
= This will return the full path of your directory.
The following example will give you clear idea,
<?php
$url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
echo $url;
?>
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment