I want to combine these:
header("Location: index.php?msg=1");
header("Location: index.php#go-hear");
To look something like this:
header("Location: index.php#go-hear?msg=1");
这可能吗? 换句话说,我正在使用 _GET 并发送一个案例以通过 switch 语句进行过滤。 但我还希望页面使用 anchor 标记重定向到页面底部,而不是顶部。
最佳答案
尝试 header("位置:index.php?msg=1#go-hear");
关于php - 使用 PHP - 如何在重定向中组合 anchor 标记和 GET 变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16889603/