且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP &URL 的哈希/片段部分

更新时间:2022-10-18 19:07:12

您需要使用 Javascript 才能阅读此内容.有几个不同的选项 - 在页面加载时,您可以使用 XmlHTTPRequest(AJAX 请求)来告诉服务器附加的 URL 参数是什么.或者,您可以检查是否有其他参数(也可以通过 Javascript),如果找到,请回发到其他 URL,该 URL 将这些参数编码到 URL 本身中.

You'll need to use Javascript to read this. There are a few different options - upon page load, you could use an XmlHTTPRequest (AJAX request) to tell the server what the additional URL parameters were. Alternatley you could check to see if there are additional parameters (also via Javascript), and if you find any, post back to a different URL that has these parameters encoded into the URL itself.