- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1046 Articles for PHP
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
54 Views
The ftp_quit() function is an alias to ftp_close(). It closes an FTP connection.Syntaxftp_quit(con);Parameterscon − The connection to close.ReturnThe ftp_quit() function returns TRUE on success or FALSE on failureExampleThe following is an example that login to a connection works in it to change the directory and then the connection is closed −
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
226 Views
The ftp_put() function uploads a file to the FTP server.Syntaxftp_put(con,remote_file,local_file,mode,beg_pos);Parameterscon − The FTP connectionremote_file − The file path to upload tolocal_fil − The path of the file to uploadmode − The transfer mode. The following are the possible value −FTP_ASCII, orFTP_BINARYbeg_pos − The position to start uploadingReturnThe ftp_put() function returns TRUE on success or FALSE on failure.ExampleThe following is an example that uploads a file to the server −
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
76 Views
The ftp_pasv() function turns the passive mode on or off.Syntaxftp_pasv(con, pasv)Parameterscon − The FTP connectionpasv − Specifies the passive mode. The following are the possible values −TRUE (passive mode on)FALSE (passive mode off)ReturnThe ftp_pasv() function returns TRUE on success or FALSE on failureExampleThe following is an example −
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
41 Views
The ftp_nlist() function returns a list of files in the specified directory on the FTP server.Syntaxftp_nlist(con,dir);Parameterscon − The FTP connectiondir − The directory to be listedReturnThe ftp_nlist() function returns an array of file names on success or FALSE on failure.ExampleThe following is an example wherein we are getting the list of files in the current directory −
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
43 Views
The ftp_nb_get() function downloads a file from the FTP server.Syntaxftp_nb_get(con,local_file,server_file,transfer_mode,beg_pos);Parameterscon − The FTP connectionlocal_file − The local file pathserver_file − The server file to downloadtransfer_mode − This is the transfer mode. The following are the possible values −- FTP_ASCII, or- FTP_BINARYbeg_pos − The position to begin the downloadingReturnThe ftp_nb_get() function returns any of the following values −FTP_FAILED − send/receive failedFTP_FINISHED − send/receive completedFTP_MOREDATA − send/receive in progressExampleThe following is an example:
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
87 Views
The ftp_nb_put() function uploads a file to the FTP server.Syntaxftp_nb_put(con,remote_file,local_file,transfer_mode,beg_pos);Parameterscon − The FTP connectionremote_file − The file to upload tolocal_file − The local file path to uploadtransfer_mode − This is the transfer mode. The following are the possible values:- FTP_ASCII, or- FTP_BINARYbeg_pos − The position to begin the downloadingReturnThe ftp_nb_put() function returns any of the following values −FTP_FAILED − send/receive failedFTP_FINISHED − send/receive completedFTP_MOREDATA − send/receive in progressExampleThe following is an example −
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
30 Views
The ftp_nb_fput() function uploads from an open file and saves it to a file on the FTP server.Syntaxftp_nb_fput(con, remote_file, open_file, transfer_mode, beg_pos);Parameterscon − The FTP connectionremote_file − The file to upload toopen_file − The pointer to the open filetransfer_mode − This is the transfer mode. The following are the possible values:- FTP_ASCII, or- FTP_BINARYbeg_pos − The position to begin the downloadingReturnThe ftp_nb_fput() function returns any of the following values −FTP_FAILED − send/receive failedFTP_FINISHED − send/receive completedFTP_MOREDATA − send/receive in progressExampleThe following is an example −Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
35 Views
The ftp_nb_fget() function downloads a file from the FTP server and saves it into an open file.Syntaxftp_nb_fget(con, open_file, server_file, transfer_mode, beg_pos);Parameterscon − The FTP connectionopen_file − The local data is stored here.server_file − The server file to download.transfer_mode − This is the transfer mode. The following are the possible values:- FTP_ASCII, or- FTP_BINARYbeg_pos − The position to begin the downloadingReturnThe ftp_nb_fget() function returns any of the following values −FTP_FAILED − send/receive failedFTP_FINISHED − send/receive completedFTP_MOREDATA − send/receive in progressExampleThe following is an example −Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
26 Views
The ftp_nb_continue() function continues to receive or send a file to the FTP server. That means the download continues.Syntaxftp_nb_continue(con);Parameterscon − The FTP connection.ReturnThe ftp_nb_continue() function returns any of the following values −FTP_FAILED − send/receive failedFTP_FINISHED − send/receive completedFTP_MOREDATA − send/receive in progressExampleThe following is an example. Here., “new.txt” is a local file, whereas server file is “server.txt” −