rquired file trouble

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
matthiasone
Forum Contributor
Posts: 117
Joined: Mon Jul 22, 2002 12:14 pm
Location: Texas, USA
Contact:

rquired file trouble

Post by matthiasone »

I am have trouble with this code:

Code: Select all

require_once("/usr/www/users/faog/Mail.php");
  $recipients = $infoї'recipients'];
  $headersї'From'] = $infoї'from'];
  $headersї'To'] = $infoї'recipients'];
  $headersї'Subject'] = $infoї'subject'];
  $body = $infoї'body'];    

  $paramsї'host'] = 'mail.lufkin.org'; 
   // Create the mail object using the Mail::factory method
  $mail_object =& Mail::factory('smtp', $params);
  $mail_object->send($recipients, $headers, $body);
  return 1;
when ever ran it gives this error

Code: Select all

Fatal error: Failed opening required 'Mail.php' (include_path='') in /usr/www/users/faog/email_fns.php on line 4
Line 4 is:

Code: Select all

require_once("/usr/www/users/faog/Mail.php");
what is wrong with my path?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

It can't find the file, does:

Code: Select all

require_once 'Mail.php';
work?

Mac
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

capitalization?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

where?
Post Reply