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:
but file name in upload folder is illegible yet.
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);
123ط³طھط§ط±ظ‡_غ°غ°-غ´غ³-غ³غ² - غ±غ³غ¹غµ-غ°غ¸-غ²غ·.jpg