Print page URL

Permalink
Hi!

Simple question: how can i print current page URL with PHP? Im building a Facebook sharer so i need to print the URL of a current page, like this:

http://www.facebook.com/share.php?u=PAGEURLHERE...

Thanks. :)

 
naumeK replied on at Permalink Best Answer Reply
naumeK
Hi
try this:
echo BASE_URL.'/'.$c->getCollectionHandle();
jero replied on at Permalink Reply
jero
global $c;
echo BASE_URL . '/' . $c->cPath;


Note that for the homepage, cPath will be NULL.