$_SERVER['REQUEST_URI'] with #hash too?

后端 未结 2 2049
遥遥无期
遥遥无期 2021-01-13 10:28

If i request site/page.php#hash the $_SERVER[\'REQUEST_URI\'] is only /page.php.

Is there a way to know in php (without later

2条回答
  •  耶瑟儿~
    2021-01-13 10:42

    Why don't you use php's $_GET method (instead of using hash(#))?

    if(isset($_GET['hash'])){/*do something*/}
    

    The # is only on the client side and php cannot access it.

提交回复
热议问题