Advertisement
Guest User

Untitled

a guest
May 14th, 2017
536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <p>cfftp lets users implement File Transfer Protocol operations. By default, cfftp caches
  2. an open connection to an FTP server.</p>
  3. <p>cfftp operations are usually of two types:</p>
  4. <ul>
  5. <li>Establishing a connection
  6. <li>Performing file and directory operations
  7. </ul>
  8. <p>This example opens and verifies a connection, lists the files in a directory, and closes
  9. the connection.</p>
  10. <p>Open a connection</p>
  11. <cfftp action = "open"
  12. username = "anonymous"
  13. connection = "My_query"
  14. password = "youremail@email.com"
  15. server = "ftp.tucows.com"
  16. stopOnError = "Yes">
  17. <p>Did it succeed? <cfoutput>#cfftp.succeeded#</cfoutput>
  18. <p>List the files in a directory:
  19. <cfftp action = "LISTDIR"
  20. stopOnError = "Yes"
  21. name = "ListFiles"
  22. directory = "/"
  23. connection = "my_query">
  24. <cfoutput query = "ListFiles">
  25. #name#<br>
  26. </cfoutput>
  27. <p>Close the connection:</p>
  28. <cfftp action = "close"
  29. connection = "My_query"
  30. stopOnError = "Yes">
  31. <p>Did it succeed? <cfoutput>#cfftp.succeeded#</cfoutput>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement