【问题标题】:HTTP Error 405 - The HTTP verb used to access this page is not allowed. Why?HTTP 错误 405 - 不允许用于访问此页面的 HTTP 谓词。为什么?
【发布时间】:2014-02-19 14:56:34
【问题描述】:
<form name="enquiry" action="eq.php" method="POST">
                <table width="50%" border="0" cellpadding="12" cellspacing="0">
                  <tr>
                    <td><span class="contact_text">Name</span></td>
                    <td><input type="text" name="first_name" class="enquiry_width" /></td>
                  </tr>
                  <tr>
                    <td><span class="contact_text">E - Mail</span></td>
                    <td><input type="text" name="email" class="enquiry_width"/></td>
                  </tr>
                  <tr>
                    <td><span class="contact_text">Mobile</span></td>
                    <td><input type="text" name="contactno" class="enquiry_width"/></td>
                  </tr>
                  <tr>
                    <td><span class="contact_text">Address</span></td>
                    <td><input type="text" name="address" class="enquiry_width"/></td>
                  </tr>
                  <tr>
                    <td><span class="contact_text">Feed Back</span></td>
                    <td><input type="text" name="feedback" class="enquiry_width"/></td>
                  </tr>
                  <tr>
                    <td><span class="contact_text">Message</span></td>
                    <td><textarea name="comments" cols="21" rows="5" class="enquiry_width" style="height:50px;"></textarea></td>
                  </tr>
                 </table>
                 <table width="0" border="0" cellspacing="0" cellpadding="0" style="margin:10px 0 0 185px;">
                  <tr>
                    <td><input type="submit" value="Submit" onclick="return validations()" class="sumbit" /></td>
                    <td><input type="reset" value="Reset" /></td>

代码运行良好,但在提交表单时显示错误代码。 eq.php 文件未执行。相反,它显示此错误。 “HTTP 错误 405 - 不允许用于访问此页面的 HTTP 谓词。”为什么?

【问题讨论】:

    标签: php forms http iis post


    【解决方案1】:

    要解决此问题,请在 http:// 之后使用 www。例如, 如果您使用http://example.com 之类的链接,那么 以这种格式使用它http://www.example.com

    【讨论】:

      【解决方案2】:

      您很可能不允许在该 URL 上发出 POST 请求。尝试检查 OPTIONS 以查看允许的内容。

      编辑:

      有关 HTTP 405 的更多信息,请访问此链接:HTTP405

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-02-02
        • 2014-11-14
        • 2016-06-04
        • 2011-10-14
        • 2014-06-05
        • 2015-10-15
        相关资源
        最近更新 更多