1. file_exists 中文路径找不到,使用iconv转码解决。

$file_path = dirname(__FILE__).'/'.$file_name;
$file_path=iconv('UTF-8','GBK',$file_path);
if (file_exists($file_path)) {
    ....
}

2. Notice: iconv(): Detected an illegal character in input string

$data_row = iconv('GB2312', 'UTF-8', $data_row);//有时候会报错
$data_row = iconv('GBK', 'UTF-8', $data_row);//GBK的字符范围比gb2312大