【问题标题】:404 Error with name="name" field名称 =“名称”字段的 404 错误
【发布时间】:2014-10-31 07:14:58
【问题描述】:

经过大量搜索后,我找到了一些答案,即如果表单的输入字段的名称属性设置为name,则会转到 404 页面,但找不到发生这种情况的原因。

我正在编写一个允许用户构建自己的表单的插件,只是想避免插件用户的任何此类冲突。

我已在此处阅读答案表格:

https://wordpress.org/support/topic/plugin-contact-form-7-submit-redirecting-to-404-page

Form going to 404 page when name input has a value

但他们没有回答为什么会这样。

提前致谢:)

【问题讨论】:

    标签: wordpress


    【解决方案1】:

    【讨论】:

    • 是的,确实如此,但它与表单提交在哪里冲突。我也找不到 WordPress 如何使用 name
    • 您应该检查 WordPress 使用的核心文件。就您而言,在开发插件时,您应该始终添加前缀。
    • @ArunSingh 你读过链接吗? Avoiding the following reserved terms is particularly important if you are passing the term through the $_GET or $_POST array. 您正在 $_POSTing 表单数据。这将返回 404。
    • 感谢@RRikesh 和@rnevius,我最好在字段name 属性前加上前缀以避免冲突。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-29
    • 1970-01-01
    • 2020-11-25
    • 2021-04-02
    • 2015-04-14
    • 1970-01-01
    相关资源
    最近更新 更多