Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with <cffile action="write" file="http:// 1

Status
Not open for further replies.

katherinep

Programmer
Joined
Sep 18, 2003
Messages
49
Location
AU
Hello,

I have a coldfusion page that takes in some variable from a form, I then want it to write this file to an xml file. I have got it to work on my local server but when I upload it to the web and change the file path to that web address I get this error:

Error processing CFFILE

Error attempting to write data to target file '
Error: All or part of the path is invalid.


My code is like this

Code:
<CFSET theFile="[URL unfurl="true"]http://www.mywebaddress/menu.xml">[/URL]

<CFOUTPUT>
<CFFILE ACTION="write" file="#theFile#" output="#thenew#">
</CFOUTPUT>

Anyone have any ideas? I can't give you the URL as it is for a client. Can I write a xml file to a web address?

Thanks in advance,

Katherine
 
you can't use an http location with cffile.


cffile uses a fully qualified path to a location on the hard drive of the server. example c:\webspace\mywebs\mysite\xml\menu.xml

If you don't ask the right questions, you don't get the right answers. A question asked in the right way often points to its own answer. Asking questions is the ABC of diagnosis. Only the inquiring mind solves problems.

-Quote by Edward Hodnett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top