/* 文件寫內容it
* $file 文件名
io
$content 內容
function
*/
coding
function writeContent($file,$content){
$myfile = fopen($file,'w');
$content = mb_convert_encoding($content,'GBK','UTF-8');
fwrite($myfile,$content);
fclose($myfile);
}
$content = "你換行了嗎?\r\n我已經換行了!";
$file = '1.txt';
writeContent($file,$content);
file