1.文件 \conf\local.php 增加$conf[‘fnencode‘] = ‘gbk‘;如果存就更改
 2.文件 \inc\pageutils.php
  
function utf8_encodeFN($file,$safe=true){
    global $conf;
    if($conf[‘fnencode‘] == ‘utf-8‘) return $file;
    if($safe && preg_match(‘#^[a-zA-Z0-9/_\-\.%]+$#‘,$file)){
        return $file;
    }
	
   //新增以下這段
    if($conf[‘fnencode‘] == ‘gbk‘){
        return mb_convert_encoding($file,‘gbk‘,‘UTF-8‘);
    }
    if($conf[‘fnencode‘] == ‘safe‘){
        return SafeFN::encode($file);
    }
    $file = urlencode($file);
    $file = str_replace(‘%2F‘,‘/‘,$file);
    return $file;
} 
 
 
 
 
function utf8_decodeFN($file){
    global $conf;
    if($conf[‘fnencode‘] == ‘utf-8‘) return $file;
    if($conf[‘fnencode‘] == ‘safe‘){
        return SafeFN::decode($file);
    }
   //新增以下這段
    if($conf[‘fnencode‘] == ‘gbk‘){
        return mb_convert_encoding($file,‘UTF-8‘,‘gbk‘);
    }
    return urldecode($file);
} 
 
 
 
 
 

  
原文:http://my.oschina.net/sorenring/blog/412380