How to obtain anchor part of URL after # in php

后端 未结 4 1381
花落未央
花落未央 2020-12-02 01:13

While using LightBox mechanism in my project I got an URL http://nhs/search-panel.php#?patientid=2 I need to collect that patientid from this through GET mechanism, Is that

4条回答
  •  长情又很酷
    2020-12-02 01:43

    Simply put: you can't! Browsers don't send the fragment (the part of the URL after the hashmark) in their requests to the server. You must rely on some client-side javascript: perhaps you can rewrite the url before using it.

提交回复
热议问题