PHP如何进行简单的文本操作?

已邀请:

zkbhj - 凯冰科技站长

赞同来自:

fwrite() 函数用于写入文件。
<?php
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
$txt = "Bill Gates\n";
fwrite($myfile, $txt);
$txt = "Steve Jobs\n";
fwrite($myfile, $txt);
fclose($myfile);
?>

要回复问题请先登录注册