ディレクトリ /MediaCDI/ にある "20160412.txt" という名前のこの ftp サーバー (ftp.cetip.com.br) からファイルを取得する必要があります。
完全なアドレスはftp://ftp.cetip.com.br/MediaCDI/20160412.txtです。これはオープン ftp ですが、cfftp を接続するにはユーザーとパスワードが必要です。次のように省略してみました。
<cfftp action = "getFile"
server="ftp.cetip.com.br"
remotefile="/MediaCDI/20160412.txt"
localfile="#Session.wwwrootPath#Temp\cdi.txt">
しかし、これは属性エラーを返します。
タグ CFFTP の属性検証エラー。
無効な属性の組み合わせがあります: action、localfile、remotefile、server。可能な組み合わせは次のとおりです。
必要な属性: 'action,localfile,password,remotefile,server,username'. オプションの属性: 'asciiextensionlist,attributes,buffersize,failifexists,fingerprint,passive,port,proxybypass,proxyserver,result,retrycount,secure,stoponerror,timeout,transfermode'.
....
user と pass なしでそれを行うにはどうすればよいですか?
更新 リーと P マスカリに感謝します。私はそれを試してみました
<cfftp connection="Myftp"
server="ftp.cetip.com.br"
username = "anonymous"
password="name@email.com" <!--- valid email --->
action="Open"
stoponerror="Yes"
secure="no">
<p>Did it succeed? <cfoutput>#cfftp.succeeded#</cfoutput><br />
<cfflush>
<cfftp connection="Myftp"
action="changedir"
directory="MediaCDI">
changed<br />
<cfflush>
<cfftp connection="Myftp"
action="getFile"
remoteFile="20160412.txt"
localfile="#Session.wwwrootPath#Temp\teste.txt"
timeout="3000">
done!!<br />
<cfflush>
エラー: 425 データ接続を構築できません: 接続がタイムアウトしました。私の問題は現在、3番目の部分にあります。匿名で接続し、ディレクトリを変更できますが、アクションgetFileがタイムアウトしました。何か案が?