<?php
$fp = fopen("testfile.txt", "w");
fprintf($fp, "%s\n", "str1");
fprintf($fp, "%s", "str2");
fclose($fp);
?>
<?php
$fp = fopen("testfile.txt", "w");
fprintf($fp, "%s\n", "str1");
fprintf($fp, "%s", "str2");
fclose($fp);
?>
<?phpтоже?
$fp = fopen("testfile.txt", "w");
fprintf($fp, "%s\n%s", "str1", "str2");
fclose($fp);
?>