Which One Does Linking To Self Page With Absolute Url?
"https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";  But take heed of the note on security with this. Whenever you build links like this, you want to also validate the end result. If you can, I would just store the HOST as a variable since that should always be the same for your site. As for REQUEST_URI just make sure that it matches an actual document you want to be shown. Make sure it is not containing anything it shouldnt like pointing at system files or files with any secrets etc. P.S. I honestly try to avoid building any links with user supplied data. I prefer to always build my own links using data that comes from the system or that I have set in a variable that cant be tampered with.