从url ColdFusion下载文件

Jan*_*ski 0 coldfusion

是否可以从给定的URL下载pdf并使用ColdFusion将其保存到服务器?我正在寻找一个类似于file_put_contents()PHP 的方法 ,我在Adobe文档中找不到任何东西.谢谢!

Mic*_*nor 12

是的,您可以使用cfhttp标记从URL下载文档并将其保存到文件中:

具体来说,你会做类似的事情:

<cfhttp method="get" url="#fileURL#" path="#filePath#" file="#fileName#" />
Run Code Online (Sandbox Code Playgroud)