• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cffile action="write" not working

New Here ,
Apr 25, 2013 Apr 25, 2013

Copy link to clipboard

Copied

Hi all

im using the following code

<cffile action="write" file="#usersId#.txt" output="tewrasdfasdfasdf asdf a dsfa " nameconflict="OVERWRITE">

however it doesnt throw any errors, and doesnt create the file in short it does nothing

im using ms server 2008 and cf 10

can anyone shed any light on it

thanks

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 25, 2013 Apr 25, 2013

Copy link to clipboard

Copied

I'm guessing it does create a file, but probably isn't putting it in the location you're expecting.  Try specifying the full filepath for it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 25, 2013 Apr 25, 2013

Copy link to clipboard

Copied

your absolutely right

thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 26, 2013 Apr 26, 2013

Copy link to clipboard

Copied

Amongst other issue you might have, <cffile action="write"> doesn't - to the best of my knowledge - support the nameconflict attribute; that's just for UPLOAD.

http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7372.html

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 26, 2013 Apr 26, 2013

Copy link to clipboard

Copied

Already sorted thanks, It was writing the file somewhere else

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 26, 2013 Apr 26, 2013

Copy link to clipboard

Copied

tramp-man wrote:

Already sorted thanks, It was writing the file somewhere else

Yes, I understand that. I was just advising that you're obviously expecting that functionality to work, and it won't.

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 26, 2013 Apr 26, 2013

Copy link to clipboard

Copied

LATEST

Ah right im with you now thanks. I'm not a CF developer it's a a CF7 we have agreed to look after because it kept getting hacked on the old CF7 server. but ill look into that thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation