<?php // function.php
// Wyciaga aktualny adres strony
function getCurrentPageUrl(){
$pageURL = 'http';
if(isset($_SERVER["HTTPS"])){
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;
}
?>
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.