Bug #28685
closedt3lib_div::getIndpEnv('REQUEST_URI') does not return fragment/hash of url
0%
Description
As written in the comment in the function getIndpEnv, this function does not handle the fragment (the text after # in the url) which is not good if you really need that part of a url. Of course there are workarounds but still, this IS a bug and should be fixed.
I for example need this to trigger a jQuery function and for that i need that hash after a redirect with the loginbox
Updated by Simon Schaufelberger over 13 years ago
this is the way how it will work:
http://stackoverflow.com/questions/940905/can-php-read-the-hash-portion-of-the-url#answer-940996
http://www.php.net/manual/en/function.parse-url.php
parse_url("http://foo?bar#fizzbuzz",PHP_URL_FRAGMENT);
output:
fizzbuzz
Updated by Simon Schaufelberger over 13 years ago
The Fragment is never sent to the server. So, this might be impossible unless you use AJAX to change the page after the fact.
Another idea would be to have Javascript turn the hash into a $_GET paramater, and then refresh the page.
ok, so this will not work. :(
It is acuatally not a php but a browser bug, see: https://bugs.php.net/bug.php?id=25804
Updated by Oliver Hader over 13 years ago
- Status changed from New to Closed
So no change required here.