Skip to content

Latest commit

 

History

History
22 lines (22 loc) · 3.36 KB

php-ftp.md

File metadata and controls

22 lines (22 loc) · 3.36 KB

Basic PHP functions required

Content from w3schools.com ©.

  1. ftp_connect(): Opens an FTP connection to the specified host.
  2. ftp_login(): Used to login to the specified FTP connection.
  3. ftp_pasv(): Turns on/off passive mode.
  4. ftp_close(), ftp_quit(): Used to close an existing FTP connection.
  5. ftp_cdup(): Changes current directory to the root directory of the FTP server.
  6. ftp_chdir(): Changes the current directory on the FTP server.
  7. ftp_pwd(): Returns the current directory name.
  8. ftp_chmod(): Sets permissions on the specified file via FTP.
  9. ftp_exec(), ftp_raw(): The ftp_exec() function requests for execution of a command on the FTP server. The ftp_raw() function sends a raw command to the FTP server.
  10. ftp_get(), ftp_put(): Used for file uploads and downloads.
  11. ftp_mdtm(): Returns the last modified time for the specified file (Does not work with directories!).
  12. ftp_mkdir(), ftp_rmdir(): The ftp_mkdir() function creates a new directory on the FTP server. The ftp_rmdir() function deletes a directory on the FTP server (Directory must be empty before it can be deleted!).
  13. ftp_delete(): Deletes a file on the FTP server.
  14. ftp_rename(): Renames a file or directory on the FTP server.
  15. ftp_mlsd(), ftp_nlist(): The ftp_mlsd() function returns the list of files in the specified directory. The ftp_nlist() function returns a list of files in the specified directory on the FTP server.
  16. ftp_rawlist(): Returns a list of files with file information (from a specified directory on the FTP server).
  17. ftp_size(): Returns the size of a specified file on the FTP server (Not all FTP servers support this).
  18. ftp_systype(): Returns the system type identifier of the FTP server.