Korean file name [a??in.jpg] is getting error in php

  php

I was uploading the files to the Korean site, and the file name will be in Korean characters. After the upload, the file’s name is showing ?. Please let me know what will be the issue. The site is developed in PHP.

Here is the code for the sample,


$content = stripslashes($_POST['content']);
        $simgName1="";
        $simgPath='';
        $chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
        echo($_FILES["file"]["name"]);
        $length = 5;
        if($_FILES["file"]["name"] != "" || $_FILES["file"]["name"] != null) {
            for($i = 0; $i < $length; $i++) {
                $simgName1 += $chars[mt_rand(0, 36)];
            }
        }
        $simgName=$simgName1.$_FILES["file"]["name"];

        if($_FILES["file"]["name"] != "" || $_FILES["file"]["name"] != null) {
            $simgPath="savedfiles/catalog/$simgName";
        }

Please let me know, what will be the issue.

Source: Ask PHP

LEAVE A COMMENT