gpt4 book ai didi

php - 提交表单值后,我无法将 URL 重定向到其他网页

转载 作者:行者123 更新时间:2023-11-30 09:01:05 25 4
gpt4 key购买 nike

你好网站管理员我在提交表单元素后尝试将网页重定向到不同的 URL/网页......我尝试了很多方法但无法修复它......请检查下面我已经尝试过的代码.. .

<?php
if(isset($_REQUEST['down'])){
header("header("location: domainpath/kothi.html");
}
?>
<html>
<body>
<form action="glitter.php" method="post">
<input type="radio" name="font" value="fonts/darkcrystaloutline.ttf"/>
<input type="radio" name="font" value="fonts/darkcrystalout.ttf"/>
</form>
</body>
</html>

我也试过

<?php
if(isset($_REQUEST['font'])){
header("location: domainpath/kothi.html");
};
?>

我也试过

<?php
header("location: domainpath/kothi.html");
?>

请帮我解决这个问题....

最佳答案

那个文件是 glitter.php 吗?重定向脚本应保存在 glitter.php 中,因为这是您提交表单时将加载的页面。

有几种方法可以进行重定向。

通过元标记:http://webdesign.about.com/od/metataglibraries/a/aa080300a.htm

通过 header :http://php.net/manual/en/function.header.php (你必须把 exit 放在 header 语句之后)

通过 Javascript:http://www.tizag.com/javascriptT/javascriptredirect.php

关于php - 提交表单值后,我无法将 URL 重定向到其他网页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9268231/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com