PHP Zend Framework - How to Get Request URI Fragment from Request Object?

后端 未结 4 1605
情话喂你
情话喂你 2021-01-05 08:10

Say e.g. i have a URI http://127.0.0.1/somecontroller/someaction#12345 that takes me to the someAction() action of the someController controller. F

4条回答
  •  离开以前
    2021-01-05 08:23

    The fragment part of the URL is never sent to the server via GET requests (or any kind of HTTP request for that matter), the only way you can get it is if you write a Javascript snippet that parses the URL and sends the fragment back to the server via Ajax for instance.

    This can't be done with PHP alone.

提交回复
热议问题