public static function encodePath($file_path)
    {
        if (self::chkChinese($file_path) && self::isWin()) {
            $file_path = iconv('utf-8', 'gbk', $file_path);
        }
        return $file_path;
    }
public static function encodePath($file_path)
    {
        if (self::chkChinese($file_path) && self::isWin()) {
            $file_path = iconv('utf-8', 'gbk', $file_path);
        }
        return $file_path;
    }
public static function encodePath ( $ file_path ) { if ( self :: chkChinese ( $ file_path ) && self :: isWin ( ) ) { $ file_path = iconv ( 'utf-8' , 'gbk' , $ file_path ) ; } return $ file_path ; }
Encodes the file path from GBK to UTF-8.
The default encoding in Windows is GBK.
And if the file path is in Chinese, the file would not be found without the transcoding to UTF-8.

@param $file_path
@return string
Encodes the file path from GBK to UTF - 8 . The default encoding in Windows is GBK . And if the file path is in Chinese the file would not be found without the transcoding to UTF - 8 .