FabioRicali.it

Ottenere l’url corrente con php

by info@fabioricali.it on mag.11, 2010, under PHP

Questa semplicissima funzione vi permettera di ottenere l’url corrente

<?php
function getCurrentUrl(){
    return "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
}
 
echo getCurrentUrl();
?>

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...