我正在建立一个人们可以向我们报告网站(CP等)的网站,我们将删除它们。我们正在使用一个html表单,通过POST提交给php然后它E-Mails我们的信息。 我得到的问题是:
Error 405: Method Not Supported
Only GET and HEAD requests supported for this resource.
这是我正在使用的代码: HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Report site - Tor's anti-terrorism campaign.</title>
<style>
h1
{
font-family:Verdana, Geneva, sans-serif;
font-size:36px;
color:#060;
}
h2
{
font-family:Verdana, Geneva, sans-serif;
font-size:16px;
color:#C33;
}
</style>
</head>
<body>
<h1>Report a site on Tor for us to hopefully take down</h1>
<h2>Sites that are listed as inappropriate material for us are:</h2>
<h2>Child pornography</h2>
<h2>Terrorist sites</h2>
<h2>Piracy sites <i>that contain child pornography or terrorist material</i></h2>
<hr />
<h2 style="color:#030"><B>Things that are actually OK:</B></h2>
<h2 style="color:#030">Black markets</h2>
<h2 style="color:#030">Copyrighted material</h2>
<h2 style="color:#030">Piracy sites</h2>
<br />
<p>Any other site you would like to report please enquire about at CONTACT INFO.</p>
<hr />
<form method="post" action="form_handler.php" name="Report">
<p>
<input type="hidden" name="derive_fields" value="email=EmailAddr,realname=FullName">
<br />
<br />
Contact E-Mail Address:
<input type="text" name="email" placeholder="thats@riseup.net" size="50">
<br />
<br />
First Name(Put anonymous to not be named):
<input type="text" name="first_name" placeholder="John" size="50">
<br />
<br />
.Onion address or web address:
<input type="text" name="onion" placeholder="e.g. dwonbdbwqdb3.onion" size="50">
</p>
<p>
Name of organization (if known): <input type="text" name="org" placeholder="organization name" size="31.75">
</p>
<p>
What is it?<select name="Type" multiple="multiple" size="5">
<option value="Terrorism">Terrorism</option>
<option value="CP">Child porn</option>
<option value="Other">Other</option>
</select>
<input type="submit" value="Submit" class="rc-button rc-button-submit">
</p>
</form></body>
</html>
PHP:
<?php
if(isset($_POST['submit'])){
$to = "thats@riseup.net";
$from = $_POST['email'];
$first_name = $_POST['first_name'];
$subject = "Form submission";
$onion = $_POST['onion'];
$org = $_POST['org'];
$type = $_POST['Type'];
$message = $first_name . "Here is the stats for the form submitted about the site" $onion . " " . $org . " " . $type;
mail($to,$subject,$message);
echo "Mail Sent. Thank you " . $first_name . ";
}
?>
任何帮助都会很好! 谢谢 html由我和我的朋友制作了一半,我完全编写了所有PHP,因此它可能是错误的PHP:)