Revision: 42851
Updated Code
at August 23, 2011 02:43 by anagaiyahoocom
Updated Code
//current page $uri = JUri::getInstance(); //another link $uri = JUri::getInstance('/somedomain.com/subdir/page.html?param=val'); //Will extract ?param=val $qry = $uri->toString(array('query')); //Will extract /somedomain.com/subdir/page.html $path = $uri->toString(array('path'));
Revision: 42850
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 11, 2011 11:34 by anagaiyahoocom
Initial Code
$uri = JUri::getInstance('/somedomain.com/subdir/page.html?param=val'); //Will extract ?param=val $qry = $uri->toString(array('query')); //Will extract /somedomain.com/subdir/page.html $path = $uri->toString(array('path'));
Initial URL
Initial Description
You can use JUri object to extract the path or query string from a any url
Initial Title
Extracting Path and Query String from Any URL String
Initial Tags
joomla
Initial Language
PHP