Here is my code
copy($_FILES['btnFile']['tmp_name'],"images/সাদাকালো-ছবি.jpg");
In OS windows i also tried with utf8_encode()
, env() but not working only showing as follows:
সাদাকালো-ছবি.jpg
Here is my code
copy($_FILES['btnFile']['tmp_name'],"images/সাদাকালো-ছবি.jpg");
In OS windows i also tried with utf8_encode()
, env() but not working only showing as follows:
সাদাকালো-ছবি.jpg
After doing some research, I got some bad news for you:
ALL php file system functions (dir, is_dir, is_file, file, filemtime, filesize, file_exists etc) only accept and return file names in ISO-8859-1, irrespective of the default_charset set in the program or ini files.
However, you can scan a dir and use it's results. But glob()
will fail if the ISO representative is ambiguous. Please check this answer.