我正在尝试使用 PHP 从网站连接到数据库。
我正在使用以下 php:
<?php
$con = mssql_connect("Server","user","password");
if (!$con)
{
die('Could not connect: ' . mssql_error());
}
// some code
?>
我正在尝试将 Web 表单的结果发送到数据库,使用:
<form action="insert.php" method="POST">
但是我得到了这个错误:
Server Error in '/' Application.
The HTTP verb POST used to access path '/insert.php' is not allowed.
我该如何解决?
最佳答案
The HTTP verb POST used to access path '/insert.php' is not allowed.
与 PHP 无关。
与您的数据库无关。
您的网络服务器拒绝将 (POST) 请求传递给 PHP,因为它已被配置为 NOT。
关于php - '/' 应用程序中的服务器错误 - 不允许用于访问路径 '/insert.php' 的 HTTP 动词 POST,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8802545/