Jump to content

included into a php script - help please


Chezshire

Recommended Posts

Hi everyone,

  relative newb here and dyslexic too boot. I'm currently trying to place a include into a mail script so that I will have only one email address file to update vs. having to update 20+ php scripts. Below is my php script example which I am working with, it's not working correctly, any help is appreciated.

 

Thank you (and I am a newbie, so please remember that when trying to explain things to me (i.e. please use small words and don't assume that I know anything - if I did my script would be working right ;) )

 

 

Example of my buggy script

 

if (!$APPROVED && !$id) { mail(" "<php? include('email_addresses.php'); ?>" ", "[$siteName] New Member", "A new member has submitted a profile to the $siteName website.\n\nName: $NAME\nUsername: $USERNAME\n\nVisit this URL to approve the member:\nhttp://www.xaviers-children.net/home.php", "Return-Path: xaviers-children <[email protected]>\nErrors-To: xaviers-children.net <[email protected]>\nFrom: xaviers-children <[email protected]>\nReply-To: xaviers-children.net <[email protected]>\nX-Mailer: PHP/" . phpversion()); }

 

 

Thank you very much for any help (and big thanks to those patient enough to use small, newbie friendly words ;) Thanks a lot foks!

 

Link to comment
https://forums.phpfreaks.com/topic/205363-included-into-a-php-script-help-please/
Share on other sites

Hi Everyone,

  I'm still working on my mail thingie and I've discovered the 'file-get-contents' function which i'm now trying to use, but it's not working for me. Below is the code and the error it produces, does anyone have any ideas of what I'm doing wrong? The function appears to be looking inside the php file instead of looking at the text file - help? Please? Beuller?

  Thanks!

  -chez

 

$emailAddresses = file_get_contents(email_addresses.txt);
  $to = $emailAddresses;
[\code]

Error produced: 
Warning: file_get_contents(email_addressestxt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/maxster/xaviers-children.net/modMail/charRequest.php  on line 21

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.