PHP输出XML文件函数
function xml_out($content, $charset = 'utf-8') { @header("Expires: -1"); @header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE); @header("Pragma: no-cache"); @header("Content-type: application/xml; charset=$charset"); echo '<' . "?xml version="1.0" encoding="$charset"?> "; echo "<root><![CDATA[" . trim($content) . "]]></root>"; exit(); }