PHP如何创建 ANSI 编码文件

WBOY
Release: 2016-06-06 20:28:27
Original
1840 people have browsed it

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

回复内容:

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

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

editplus保存时选择ANSI

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template