Home >Backend Development >PHP Tutorial >Why does file creation fail? ?

Why does file creation fail? ?

WBOY
WBOYOriginal
2016-09-21 14:12:531270browse

English and numbers are fine. Why not Chinese? How to create Chinese? It doesn’t work even if you try this way$a=iconv("gb2312", "UTF-8", $n).'.txt';

<code>$n='你';
$a=$n.'.txt';
$fopen=fopen($a,'w');</code>

Reply content:

English and numbers are fine. Why not Chinese? How to create Chinese? It doesn’t work even if you try this way$a=iconv("gb2312", "UTF-8", $n).'.txt';

<code>$n='你';
$a=$n.'.txt';
$fopen=fopen($a,'w');</code>

<code>$n="你好";
$a=$n.'.txt';
$a = iconv("UTF-8", "GBK", $a);
$fopen=fopen($a,'w');</code>

I succeeded like this~

No one....

It’s named in Chinese, the demand is too weird, it’s best to avoid Chinese, there are many problems.

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