开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜