不允许使用用于访问路径/php-email-function/phpmail.php的HTTP动词POST. [英] HTTP verb POST used to access path /php-email-function/phpmail.php' is not allowed.

查看:116
本文介绍了不允许使用用于访问路径/php-email-function/phpmail.php的HTTP动词POST.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在html页面上工作.在联系页面中,我需要向用户发送消息.当我单击按钮时,我需要向邮件发送一些消息.

< form method ="post" action ="phpmail.php">
< table>
</table>
</form>

正在在phpmail.php中编写一些代码,下面是

< title> PHP电子邮件功能</title>< div>

<?php
$ name = $ _ POST [''name''];
$ email = $ _ POST [''email''];
$ mobile = $ _ POST [''mobile''];
$ message = $ _ POST [''message''];

$to=info@Fb.com;
$ subject =欢迎使用www.webinfopedia.com";

$ message =发件人:$ name< br/>移动设备:$ mobile< br/>".$message;

$ headers ="MIME版本:1.0". "\ r \ n";
$ headers.=" Content-type:text/html; charset = iso-8859-1. "\ r \ n";

//更多标题
$ headers.=``来自:< info@webinfopedia.com>''. "\ r \ n";
$ headers.=``抄送:webinfopedia.com@gmail.com''. "\ r \ n";
@mail($ to,$ subject,$ message,$ headers);
如果(@mail)
{
回显电子邮件发送成功!";
}
?>


当运行联系页面并单击提交"按钮时,会出现以下错误:不允许使用用于访问路径/php-email-function/phpmail.php的HTTP动词POST."

Hi All,

Am working on html page. In the contact page i need send message to user. When am clicking the button i need to send some message to mail.

<form method="post" action="phpmail.php">
<table>
</table>
</form>

am writing some code inside the phpmail.php is bellow

<title>PHP email function</title><div>

<?php
$name=$_POST[''name''];
$email=$_POST[''email''];
$mobile=$_POST[''mobile''];
$message=$_POST[''message''];

$to=info@Fb.com;
$subject="Welcome to www.webinfopedia.com";

$message="From:$name <br />Mobile:$mobile <br />".$message;

$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";

// More headers
$headers .= ''From: <info@webinfopedia.com>'' . "\r\n";
$headers .= ''Cc: webinfopedia.com@gmail.com'' . "\r\n";
@mail($to,$subject,$message,$headers);
if(@mail)
{
echo "Email sent successfully !!";
}
?>


when run the contact page and click on submit button ill got these error The "HTTP verb POST used to access path /php-email-function/phpmail.php'' is not allowed.

推荐答案

name =


_POST [''name''];
_POST[''name''];


email =


这篇关于不允许使用用于访问路径/php-email-function/phpmail.php的HTTP动词POST.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆