我是越南人,我想上传一个 utf-8 文件名,例如
Tên Tệp Tiếng Việt.JPG
这是我的代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>utf-8</title>
</head>
<body>
<?php
if(isset($_POST["submit"])) {
if($_FILES["upload"]["error"] > 0 ) echo "FILE ERROR!";
else
{
$base_dir = "D:/";
$fn = $_FILES["upload"]["name"];
$fn2 = $base_dir.$fn;
move_uploaded_file($_FILES["upload"]["tmp_name"],$fn2);
}
}
?>
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<input type="file" name="upload" id="upload" />
<input type="submit" name="submit" id="submit" value="Send" />
</form>
</body>
</html>
但是当我上传我在我的电脑上看到的 D:\ 有一个像
Tên Tệp Tiếng Việt.JPG
怎么解决 谢谢