store emails in textfile? php
This spinet of code renders a users email when a user enters a page of my site: . .
$email=$userprofile->email;
. . you can echo it like this:
&l开发者_StackOverflow中文版t;?php echo $email;?>
but how would you store it in a text file with one email per line? thanks
file_put_contents("name_of_file.txt", preg_replace("/\r|\n/"," ", $email)."\n");
Learn to use the php docs. They are excellent.
精彩评论