<?php
header
("content-type:text/html;charset=utf-8");
highlight_file(__FILE__);

// date_default_timezone_set("PRC");
//允许加载外部实体

libxml_disable_entity_loader(false);
//获取post请求的内容
$xmlfile $_POST['xml'];
// $xmlfile = file_get_contents($xml);
// $xmlfile = file_get_contents("php://input");
//创建一个节点,理论上默认代表跟节点
$dom = new DOMDocument();
// options 中配置代表允许加载外部实体
$dom->loadXML($xmlfile,LIBXML_NOENT LIBXML_DTDLOAD);
$creds simplexml_import_dom($dom);
echo 
$creds;
?>