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\"?>\n";
	echo "<root><![CDATA[" . trim($content) . "]]></root>";
	exit();
}

相关文章:

  • 2022-12-23
  • 2021-07-09
  • 2022-12-23
  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
  • 2021-06-22
  • 2022-12-23
猜你喜欢
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2021-05-27
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
相关资源
相似解决方案