"/> ">

Home >Backend Development >PHP Tutorial >response.write PHP implementation code for writing files encoded as UTF8 by WRITE

response.write PHP implementation code for writing files encoded as UTF8 by WRITE

WBOY
WBOYOriginal
2016-07-29 08:38:212434browse

$f=fopen("test.txt", "wb");
$text=utf8_encode("桨!");
// adding header
$text="xEFxBBxBF".$text;
fputs($f, $text);
fclose($f);
?>

The above introduces the implementation code of response.write PHP writing WRITE encoded UTF8 files, including the content of response.write. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn