Home  >  Article  >  Backend Development  >  PHP如何创建 ANSI 编码文件

PHP如何创建 ANSI 编码文件

WBOY
WBOYOriginal
2016-06-06 20:28:271750browse

不是转换文本文件内容,是创建一个ANSI编码的文件。

回复内容:

不是转换文本文件内容,是创建一个ANSI编码的文件。

可以的,一般情况下php创建的文件是Unicode的编码,使用代码如下:即创建了test.txt文件,文件内容为abc,如要改为ansi编码,需要转换编码file_put_contents('test.txt',iconv('UTF-8','GBK','abc'));

editplus保存时选择ANSI

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