php - Read current URL or URL variable in joomla -


this question has answer here:

i'm using joomla 2.5. i'm trying read url variable or full url in joomla component customization.

i'm able read url like:

http://xyz/index.php?option=com_xyz&format=raw&tmpl=component&lang=en 

but read url on browser (with alias):

http://xyz/en/feedback?id=123456&email=abc@hotmail.com 

feedback joomla alias. i'm redirecting url variable php script.

if try:

$_server['http_referer'];  // not working in ie.  $_server['query_string'] //return com_xyz&format=raw&tmpl=component&lang=en  jrequest::getvar('email'); // return null works if try getvar('lang');  

is there other solution or better way?

try using following. might you're looking for:

$url = juri::current(); echo $url; 

using javascript, use this:

document.location.href 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -