私は現在、うんざりしていて、このエラーの愚かさにばかげて混乱しています。正直なところ、私には意味がありません。
だから私は4つのウェブサイトのネットワークを持っていて、すべて同じcontact.phpスクリプトを使って貼り付けています。
したがって、3 つのサイトで、スクリプトは完全に機能します。ただし、サイトの 1 つで、エラーがポップアップし続けます。それらは同じサーバー上にあり、異なるコンテンツを除いてまったく同じ html ファイルを使用しているため、エラーはまったく発生しないはずです。
Warning: include(../../vip/boss/mailer/class.phpmailer.php) [function.include]: failed to open stream: No such file or directory in /home/aap/public_html/justevents.net.au/quickcontact.php on line 2
Warning: include(../../vip/boss/mailer/class.phpmailer.php) [function.include]: failed to open stream: No such file or directory in /home/aap/public_html/justevents.net.au/quickcontact.php on line 2
Warning: include() [function.include]: Failed opening '../../vip/boss/mailer/class.phpmailer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/aap/public_html/justevents.net.au/quickcontact.php on line 2
Warning: include(../../vip/boss/mailer/class.smtp.php) [function.include]: failed to open stream: No such file or directory in /home/aap/public_html/justevents.net.au/quickcontact.php on line 3
Warning: include(../../vip/boss/mailer/class.smtp.php) [function.include]: failed to open stream: No such file or directory in /home/aap/public_html/justevents.net.au/quickcontact.php on line 3
Warning: include() [function.include]: Failed opening '../../vip/boss/mailer/class.smtp.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/aap/public_html/justevents.net.au/quickcontact.php on line 3
Fatal error: Class 'PHPMailer' not found in /home/aap/public_html/justevents.net.au/quickcontact.php on line 27
私を助けてください
<?php
include("../../vip/boss/mailer/class.phpmailer.php");
include("../../vip/boss/mailer/class.smtp.php");
function heal($str) {
$injections = array('/(\n+)/i',
'/(\r+)/i',
'/(\t+)/i',
'/(%0A+)/i',
'/(%0D+)/i',
'/(%08+)/i',
'/(%09+)/i'
);
$str= preg_replace($injections,'',$str);
return str_replace('@','-AT-',$str);
}
$name = heal($_POSTname);
$email = str_replace('-AT-','@',heal($_POSTemail));
$message = heal(str_replace("\n",'<br>',$_POSTmessage));
$category = heal($_POSTcategory);
if(substr_count($email,'@')==1){
$mail=new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = "localhost";
$mail->SMTPSecure = "ssl";
$mail->Port = 465;
$mail->Username = "autonote@justevents.net.au";
$mail->Password = "REDACTED";
$mail->From = "autonote@justevents..net.au";
$mail->FromName = $name;
$mail->Subject = $category.' Enquiry';
$mail->Body = $message;
$mail->WordWrap = 50;
$mail->AddAddress("admin@justevents..net.au","justevents. Enquiry");
$mail->AddReplyTo($email,$name);
$mail->IsHTML(true);
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
}else{
header("LOCATION:quicksuccess.html");
}
}else{
echo 'There was an error, please try again. '.substr_count($email,'@');
}
?>