/ Published in: PHP
You can use JUri object to extract the path or query string from a any url
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//current page $uri = JUri::getInstance(); //another link $uri = JUri::getInstance('/somedomain.com/subdir/page.html?param=val'); //Will extract ?param=val //Will extract /somedomain.com/subdir/page.html