我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何通过PHP获取page.html#PARAMETERS?

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

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).

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

近期文章

  • PHP逐行对变量执行操作
  • 在现场网站上处理错误消息的最佳方式[关闭]
  • Laravel:将路由参数传递给filter参数
  • Laravel使用PUT方法为PUT路由形成html
  • 游标状态无效 - pdo_odbc FreeTDS SQL Server
  • PHP,PDO fetchAll如何反序列化特定的行
  • 将图像上传到真实的Web服务器不起作用
  • 在PHP中关闭连接但继续执行脚本
  • 包含括号的PHP preg_replace值
  • Magento:总是将我重定向到“/ downloader”路径
  • exec没有正确执行php命令centos 7
  • 将SQL转换为Eloquent Query Builder:Laravel5.5
  • 我放置wp_mail()函数的位置是否重要?
  • 这个功能是否存在或是否已被弃用?
  • 如何用数组查询数据库? WHERE ='array()'
  • 我无法执行下面的代码的原因是什么? [重复]
  • 为什么这个PHP脚本只返回6号?
  • 正则表达式匹配逗号不在分组符号之间
  • PHP MySql查询在更新后显示旧值
  • cUrl,PHP和访问特定标头类型

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华