var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
xmlhttp.Open("POST", mainPage + "/component/FileHandle/FileHandle.asp?fileHandleType=Save&filePath=" + filePath, false);
var xmlDoc = new ActiveXObject("MSXML.DOMDocument");
xmlDoc.async = false;
xmlDoc.loadXML("<?xml version=\"1.0\" encoding=\"gb2312\"?><root></root>"); var CDATASectionObj = xmlDoc.createCDATASection(fileContent);
xmlDoc.documentElement.appendChild(CDATASectionObj); xmlhttp.Send(xmlDoc);
return xmlhttp.responseText;通过xmlhttp同步直接写入数据库
xmlhttp.Open("POST", mainPage + "/component/FileHandle/FileHandle.asp?fileHandleType=Save&filePath=" + filePath, false);
var xmlDoc = new ActiveXObject("MSXML.DOMDocument");
xmlDoc.async = false;
xmlDoc.loadXML("<?xml version=\"1.0\" encoding=\"gb2312\"?><root></root>"); var CDATASectionObj = xmlDoc.createCDATASection(fileContent);
xmlDoc.documentElement.appendChild(CDATASectionObj); xmlhttp.Send(xmlDoc);
return xmlhttp.responseText;通过xmlhttp同步直接写入数据库
生成字符串
通过xmlhttp写入数据库