Search
Other Sourcerer questions
Forum

insert php to get current $uri won't work

fion's Avatar fion
Dear Sirs,

I try to insert php code as below

{source}<?php
$uri = JFactory::getURI();
echo $absolute_url = $uri->toString(array('scheme','host','port','path','query'));
$subject = "Testing Here";

echo "<a href='mailto:" . $to . "?subject=".$subject."&body=" .$absolute_url. "'><img src='/images/_DontDelete/Email_64x64.png' alt='' width='48' height='48'/> </a>";
?>

{/source}

the $absolute_url show

abc.mywebsite.com/index.php/en/?option=c...=article&id=104&ml=1

and not as real link
abc.mywebsite.com/index.php/en/energy-sa...commercial-sector-en

Please do teach us how to get the real link

Thanks indeed
Fion
fion's Avatar fion
Dear Sir,

I got the solution as below

{source}<?php
$uri = JFactory::getURI();
echo $absolute_url = $uri->toString(array('scheme','host','port','path','query'));

?>{/source}

Thanks for your kind attention
Fion
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription