Vero, non ci avevo pensato, posto il codice, semplice semplice di codifica di un file

Codice PHP:
$filename "regioni.csv";
$handle fopen($filename"r");
$contents base64_encode(fread($handlefilesize($filename)));
fclose($handle);
$xml .= "\t<file>\n";
$xml .= "\t\t<filename>".$filename."</filename>\n";
$xml .= "\t\t<content>\n";
$xml .= $contents;
$xml .= "\t\t</content>\n";
$xml .= "\t\t<path>folder_attach_images</path>\n";
$xml .= "\t</file>\n";
header("Content-Type: application/xhtml+xml");
echo 
$xml