i use persian name in file name.
when i upload a file (with persian name) and move it to upload folder, file name is illegible. i use this code:
Code: Select all
@$name = preg_replace('/(.+?)\.'. $extension .'$/i', '$1_'. $time2 .'.'. $extension, $_FILES["file"]["name"]);
$unicode = iconv('windows-1256', 'utf-8', $name);
move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $name);
but file name in upload folder is illegible yet.
123ط³طھط§ط±ظ‡_غ°غ°-غ´غ³-غ³غ² - غ±غ³غ¹غµ-غ°غ¸-غ²غ·.jpg