标签:
function get_url(){ $pageURL = ‘http‘; if ($_SERVER["HTTPS"] == "on") { $pageURL .= "s"; } $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; } return $pageURL; }
php 获取当前url,可以规避框架url重写后还有index.php的情况
标签:
原文地址:http://www.cnblogs.com/whlives/p/4670916.html