How can i get the page.html#PARAMETERS through PHP?

前端 未结 2 807
生来不讨喜
生来不讨喜 2021-01-28 10:00

How can I get the value of the URL hash (eg \"PARAMETERS\" in url \"page.html#PARAMETERS\") on the server in PHP?

相关标签:
2条回答
  • 2021-01-28 10:21

    You can't, unless you got something client-side to explicitly transfer it to you. The fragment part is only handled by the browser.

    0 讨论(0)
  • 2021-01-28 10:43

    You can't, at least not directly. The fragment identifier is never sent to the server.

    You could extract it in JS using location.hash and then trigger another HTTP request to the server that includes it as data (e.g. in the query string).

    0 讨论(0)
提交回复
热议问题