需要使用iconv函数进行字符编码转换.
iconv(string $in_charset, string $out_charset, string $str) string
Description
Convert string to requested character encoding
Parameters
in_charset string
out_charset string
str string
Returns
string the converted string or false on failure.
用法如:
$filename=$_FILES['userfile']['name'];
$filename=iconv("utf-8","gbk",$filename);
iconv(string $in_charset, string $out_charset, string $str) string
Description
Parameters
Returns
用法如:
$filename=$_FILES['userfile']['name'];
$filename=iconv("utf-8","gbk",$filename);