时间:2010-07-25 18:39:58

标签: coldfusion xmlhttprequest cffile

3 个答案:

答案 0 :(得分:9)

答案 1 :(得分:5)

尝试这样的事情

<cfscript>
    i = 1;
    myPath = 'D:\webroot\sap\returns\log';
    myFileName = orderNumber;
</cfscript>
<cfloop condition="fileExists('#myPath#\#myFileName#.xml')">
    <cfscript>
        myFileName = '#orderNumber#_#i#';
        i += 1;
    </cfscript>
    <cfif i GT 100><cfbreak /></cfif>
</cfloop>

<cffile action="write" file="#myPath#\#myFileName#.xml" output="#xmlString#"  />

答案 2 :(得分:4)