获取完整的url php
$fullURL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
php用get获取url
$full_url = 'http://'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI];
获取页面url php
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
php获取url路径名
parse_url( $_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH );
php获取url
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";