开发者

store emails in textfile? php

开发者 https://www.devze.com 2023-01-28 02:39 出处:网络
This spinet of code renders a users email when a user enters a page of my site: . . $email=$userprofile->email;

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

精彩评论

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