我有一个网址,由于某种未知原因而被禁止返回403.我已禁用.htaccess中的mod_security,chmodded文件为0777.URL为
当你提交任何想法时,它会发生吗?
这是代码
function PublicAddVideo()
{
if (isset($_POST['submit_addvideo']))
{
require_once("class.phpmailer.php");
//send email tobirthday person
$subject="New AfroStar Video Suggested";
$msg = "Dear Jordah,\n".
"Youtube video: ".$_POST['youtubesle']."\n Star Name: ".$_POST['starnamesle']."\n Country: ".$_POST['countrysle']."\n IP Address: ".getRealIpAddr();
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "localhost"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "support@veepiz.com"; // SMTP username
$mail->Password = "********"; // SMTP password
$mail->From = "support@veepiz.com";
$mail->FromName = "Veepiz";
$mail->AddAddress('jordahz@hotmail.com',"Jordah Ferguson");
$mail->AddReplyTo("support@veepiz.com", "Veepiz");
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = $subject;
$mail->Body = nl2br($msg);
$mail->AltBody = $msg;
if(!$mail->Send())
{
}
?>
} else
{
$this->DisplayHeader("Add African Video");
?>
var checkHelpVars=function ()
{
err='';
if ($('#starnamesle').val().length==0) err+="Please type in the name of the star";
if ($('#countrysle').val().length==0) err+="\nName of the country missing";
if ($('#youtubesle').val().length==0) err+="\nYoutube url missing";
var url=$('#youtubesle').val();
var matches = url.match(/^http:\/\/(?:www\.)?youtube.com\/watch\?(?=.*v=[\w-]+)(?:\S+)?$/);
if (matches) {
} else {
err +="\nInvalid Youtube Url";
}
if (err.length>0)
{
alert(err);
return false;
}
if (isloggedin())
{
echo "return postPage('afrostar_class.php?app=help&func=addvideo',{starnamesle:$('#starnamesle').val(),countrysle:$('#countrysle').val(),youtubesle:encodeURI($('#youtubesle').val()),submit_addvideo:1});";
} else
{
echo "return true;";
}
?>
}
Africa Artist Name: | |
Country: | |
Youtube link: | Example:http://www.youtube.com/watch?v=vJyftjMOd2w |
$this->DisplayFooter();
}
}
解决方法:
检查您的帖子数据,如果它包含任何网址,则有可能在服务器中被阻止.
你应该替换你提交的网址中的某些字符,然后你需要在帖子上转换回原来的形式.
标签:php,http-status-code-403
来源: https://codeday.me/bug/20191007/1866211.html