我正在尝试让 php 登录龙卷风,当我单击"登录"时,我收到一个页面,显示错误"不允许 405 方法"。
这是我的表格:
<form method="POST">
<fieldset id="inputs">
<input name="username" id="username" required>
<input name="password" id="password" type="password" name="Password" placeholder="Password" required>
</fieldset>
<fieldset id="actions">
<input type="submit" id="submit" value="Log in" name="submit">
<label><input type="checkbox" checked="checked"> Keep me signed in</label>
</fieldset>
</form>
您需要向表单添加一个操作,并在处理程序中有一个 post 方法。如果您设置了如下处理程序:
(r"/feedback", FeedbackHandler)
它有一个发布方法:
def post(self):
#do something here
以及具有以下形式的表格:
<form action="/feedback" method="post" >
它应该有效。