1, it can be run locally; 
 2. After uploading the server, both fopen and file_exists failed. I printed the file address, no problem, specially opened the alternate address, or failed 
function charaget($data){
  if(!empty($data) ){    
    $fileType = mb_detect_encoding($data , array("UTF-8","GBK","LATIN1","BIG5")) ;   
    if( $fileType != "GB2312"){   
      $data = mb_convert_encoding($data ,"GB2312" , $fileType);   
    }   
  }   
  return $data;    
}after use, the code can print the correct path, but can not read the file, and finally converted to UTF-8, the server will be normal, I do not know what other methods.
