我目前对这个错误的愚蠢性感到震惊和困惑。老实说,这对我来说毫无意义。
所以我有一个由 4 个网站组成的网络,它们都使用相同的 contact.php 脚本,该脚本是粘贴的。
因此,在其中三个站点上,该脚本运行良好。但是在其中一个站点上,它不断弹出错误。根本不应该有任何错误,因为它们在同一台服务器上并且使用完全相同的 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,'@');
}
?>