PHP は文字列を txt ファイルに書き込み、改行します
<br />$DOCUMENTROOT = $_SERVER['DOCUMENT_ROOT'];<br /> $file = fopen("$DOCUMENTROOT/php_02/123.txt","wb");<br /> fwrite($file,"line 1 "."\n"." line 2 n line 3");<br /> fclose($file);<br />
<br />$DOCUMENTROOT = $_SERVER['DOCUMENT_ROOT'];<br /> $file = fopen("$DOCUMENTROOT/php_02/123.txt","wb");<br /> fwrite($file,"line 1 "."\r\n"." line 2 n line 3");<br /> fclose($file);<br />