开发者

PHP:How can I send the Data entered by a user in a text field to a txt file?

开发者 https://www.devze.com 2022-12-29 03:36 出处:网络
In PHP How can I send the D开发者_运维知识库ata entered by a user in a text field to a txt fileinside of a folder on my server.To clear the file and open for writing:

In PHP How can I send the D开发者_运维知识库ata entered by a user in a text field to a txt file inside of a folder on my server.


To clear the file and open for writing:

$h = fopen("path and filename", "wb+");

or appending:

$h = fopen("path and filename", "ab+");

To write to the file:

fwrite($h, $myString);

Then close it:

fclose($h);
0

精彩评论

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

关注公众号