php - 使用 PHP - 如何在重定向中组合 anchor 标记和 GET 变量

标签 php html get anchor

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/

相关文章:

php - PHP 是否具有类似于 .NET 的数据集的结构?

php - 在图像下方添加文本,输出取决于输入语言?

php - 通过 PHP 需要 for 循环和动态 css

php - 如何自定义插入到 WordPress 帖子中的图像的 HTML 标记?

rest - 如何创建有意义的 REST 响应消息?

PHP header 发送 PHP 文件,而它不应该

php - Symfony2 拒绝访问的功能测试

android - 在电子邮件android中设置可点击链接

Angular2 - http.get 不调用 webpi

jquery .get 无法在 ie9 中针对 google api 工作