Reply to fopen()

Your name:

Reply:


Posted by Kevin Raleigh on 08/18/07 02:37

Is there something that says that I can only have only one file
open at a time?

The reason I ask is if I run two file open connections at the same time
my emailAddresses.txt file is read, but none of my emails are sent.
All of the data ends up in my error_file_log.txt. If I comment out the
second fopen() stream used for my error log my email program
works fine. Very strange behavior...

And while I am on the subject this code:
$file_emailErr = @fopen("emailErrorLog.txt", "a") or exit("Unable to open
file!");
$subject = "\n\n" . "Subject: " .$subject .
"\n************************************************************\n";
@fwrite($file_emailErr, $subject);

outputs this text:

Subject: test 2
************************************************************

This code
if(!$mail->Send()){
$myString = $emailAdd . "\t" . $myName . "\n";
fwrite($file_emailErr, $myString);
}
outputs this text:
kraash@mysite.net
Kevin
asdf@asdf.com
Jone
qwer@asdfa.net
Jack
kraash@mysite.net
Kevin

Why is the name written to a newline in the second code example, but the
first
example works as it should?

insight always appreciated
thank you
Kevin

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация