JFactory/getURI
From Joomla! Documentation
< JFactory
Static method which returns a reference to the global JURI object, only creating it if it doesn't already exist. The object returned will be of type JURI. The global URI object represents the URI that caused the current page to be rendered.
Syntax
object JURI getURI()
Example
In this example, the global URI object is output as a string.
$u =& JFactory::getURI(); echo 'URI is ' . $u->toString() . "\n";
might output
URI is http://www.example.com/joomla/index.php?task=view&id=12&Itemid=29