我想限制上傳中文檔名的檔案會失敗,該怎麼改???
<?php
$upload_dir='./abc/';
foreach($_FILES['UpFile']['error'] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
move_uploaded_file($_FILES["UpFile"]["tmp_name"][$key],
$upload_dir . $_FILES['UpFile']['name'][$key]);
echo $_FILES['UpFile']['name'][$key] . '上傳成功<br />';
}
elseif ( $error != UPLOAD_ERR_NO_FILE) {
echo $_FILES['UpFile']['name'][$key] . '上傳失敗<br />';
}
}
?>