Notoriouswow Posted January 7, 2010 Share Posted January 7, 2010 On My Website I Devised A Password Changer Script, Although I Keep Getting This Error. I Know Theres Some Directory I Have To Change Just Don't To What / Where It Is Located. Hes My Error: Warning: require_once(includes/phpmailer_include.php) [function.require-once]: failed to open stream: No such file or directory in C:\Fusion Arcemu 3.2.2\Server\htdocs\includes\sendmail_include.php on line 8 Fatal error: require_once() [function.require]: Failed opening required 'includes/phpmailer_include.php' (include_path='C:\Fusion Arcemu 3.2.2\Server\php\pear\') in C:\Fusion Arcemu 3.2.2\Server\htdocs\includes\sendmail_include.php on line 8 Here's My Code: <?php if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; } function sendemail($toname,$toemail,$fromname,$fromemail,$subject,$message,$type="plain",$cc="",$bcc="") { global $settings, $locale; require_once INCLUDES."phpmailer_include.php"; $mail = new PHPMailer(); if (file_exists(INCLUDES."languages/phpmailer.lang-".$locale['phpmailer'].".php")) { $mail->SetLanguage($locale['phpmailer'], INCLUDES."language/"); } else { $mail->SetLanguage("en", INCLUDES."language/"); } if ($settings['smtp_host']=="") { $mail->IsMAIL(); } else { $mail->IsSMTP(); $mail->Host = $settings['smtp_host']; $mail->SMTPAuth = true; $mail->Username = $settings['smtp_username']; $mail->Password = $settings['smtp_password']; } $mail->CharSet = $locale['charset']; $mail->From = $fromemail; $mail->FromName = $fromname; $mail->AddAddress($toemail, $toname); $mail->AddReplyTo($fromemail, $fromname); if ($cc) { $cc = explode(", ", $cc); foreach ($cc as $ccaddress) { $mail->AddCC($ccaddress); } } if ($bcc) { $bcc = explode(", ", $bcc); foreach ($bcc as $bccaddress) { $mail->AddBCC($bccaddress); } } if ($type == "plain") { $mail->IsHTML(false); } else { $mail->IsHTML(true); } $mail->Subject = $subject; $mail->Body = $message; if(!$mail->Send()) { $mail->ErrorInfo; $mail->ClearAllRecipients(); $mail->ClearReplyTos(); return false; } else { $mail->ClearAllRecipients(); $mail->ClearReplyTos(); return true; } } ?> Link to comment https://forums.phpfreaks.com/topic/187630-changing-password/ Share on other sites More sharing options...
RaythMistwalker Posted January 7, 2010 Share Posted January 7, 2010 what directory is the include file in compared to the php file? Link to comment https://forums.phpfreaks.com/topic/187630-changing-password/#findComment-990604 Share on other sites More sharing options...
Notoriouswow Posted January 7, 2010 Author Share Posted January 7, 2010 the Include is in the /includes in the website file the php is in /php on the server files Link to comment https://forums.phpfreaks.com/topic/187630-changing-password/#findComment-990634 Share on other sites More sharing options...
RaythMistwalker Posted January 7, 2010 Share Posted January 7, 2010 what i meant is, is the file in the SAME directory? it may be you don't have ../ or you have it and don't need it Link to comment https://forums.phpfreaks.com/topic/187630-changing-password/#findComment-990649 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.