php - Safari ios 将表单从 https 提交到 http 页面开始加载但停止

标签 php ios forms http safari

当我尝试从 Https 向 http 提交表单时,它显示:

Form Insecure are you sure you want to submit?

当我提交页面时,它开始加载并永远挂起。此表单提交适用于 android PC 和 safari mac。

最佳答案

正如我在评论中所说,将脚本、图像等的所有 http:// 实例更改为 //。它们将自动检测环境中的任一协议(protocol)它在里面。

如果如您所说,它重定向到 https 协议(protocol)而不是您希望它重定向到 http,您可以简单地使用 header或其他形式的重定向。

例子:

header("Location: http://example.com/other_page.php");
exit; // This stops further execution

或元方法:

<meta http-equiv="refresh" content="0;url=finalpage.html">

或Javacript:

window.location.replace("http://example.com/");

上面的例子是从:

How to make a redirect in PHP?

关于php - Safari ios 将表单从 https 提交到 http 页面开始加载但停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52894932/

相关文章:

ios - dynamodb scanexpression 在 objective-c 中使用扫描过滤器

ios - iOS 表/ Collection View 中的单元格间布局逻辑

javascript - 存储动态添加的输入的 $index 值

ruby-on-rails - 接受_nested_attributes_for 和find_or_create?

php - 更新时,跳过更新 yii 的某些属性

php - 使用 PHP 创建、编辑和删除 crontab 作业?

php - 使用数组仅将选定的值传递给函数

iphone - 是否可以在 GameKit 中制作运行的高分排行榜?

django - 无法将表单内容保存到数据库

php - PHP脚本不会显示错误,只会显示空白页