01 July 2009

Writing text file in UTF-8 encoding


fopen(sample.txt", "wb");
// adding header
$text="\xEF\xBB\xBF".$text
;
fputs($f, $text
);
fclose($f
);
?>

No comments:

Post a Comment