Tuesday, May 29, 2012
How to get full url of website uing php
$protocol = $_SERVER['HTTPS'] == 'on' ? 'https' : 'http';
$url = $protocol.'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; // More efficient manner
echo $url;
$url = $protocol.'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; // More efficient manner
echo $url;
Labels:
PHP
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
[フレーム]