Error with fopen and foreach...

From: Date: Sat, 10 May 2003 10:12:15 +0000
Subject: Error with fopen and foreach...
Groups: php.general 
Request: Send a blank email to php-general+get-147102@lists.php.net to get a copy of this message
Hello, i am trying to create a program to managem my site mailing list... As i don't want to use mysql, i am trying to create a 0-length file with user e-mail just to prevent from sending mail twice... But for any reason fopen is not working in my script... it justs write the last file to the disk... This is the test source code: //$email2 is an array with e-mail adresses $l = 0; foreach($email2 as $value){ echo "VALUE: $value<br>"; $cont = fopen("$value","a+"); $close = fclose($cont); $l++; }; As you can see, script get an e-mail adress and tries to create an file called $email as it doesn't exists yet... But this function is creating just the last e-mail file... Anyone could help me please? --- UOL, o melhor da Internet http://www.uol.com.br/

« previous php.general (#147102) next »