- 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 34490 Articles for Programming
88 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 −
31 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
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
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” −
57 Views
The ftp_mkdir() function is used to create a new directory on the FTP server.Syntaxftp_mkdir(con,dir);Parameterscon − The FTP connectiondir − The name of the directory to be createdReturnThe ftp_mkdir() function returns name of the directory on success, or FALSE on failureExampleThe following is an example that creates a new directory −
122 Views
The ftp_mdtm() function returns the last modified time of a specified file in PHP.Syntaxftp_mdtm(con,file);Parameterscon − The FTP connectionmyfile − The file to checkReturnThe ftp_mdtm() function returns the last modified time as a Unix timestamp.ExampleThe following is an example −
66 Views
The ftp_login() function allows you to log in to the FTP connection.Syntaxftp_login(con,user_name,password);Parameterscon − The FTP connectionuser_name − The user name to log inpassword − The password to loginReturnThe ftp_login() function returns TRUE on success or FALSE and warning on failure.ExampleThe following is an example −
224 Views
The ftp_get() function is used to downloads file from the FTP server and save it into a local file.Syntaxftp_fget(con,local_file,server_file,mode,startpos);Parameterscon − The FTP connectionlocal_file − A file where the data is storedserver_file − The server file to downloadmode − The transfer modestartpos − The position to begin downloading from. Added in PHP 4.3.0.ReturnThe ftp_fget() function returns TRUE on success and FALSE on failure.ExampleThe following is an example wherein we will download server file “demo.txt” and save it to local file “new.txt” −
60 Views
The ftp_get_option() function returns runtime options of the FTP connection.Syntaxftp_get_option(con,option);Parameterscon − The FTP connection.option − The runtime option to return.The following are the possible values −FTP_TIMEOUT_SEC - The timeout used for network operationsFTP_AUTOSEEK - Returns TRUE if this option is on, FALSE otherwiseReturnThe ftp_get_option() function returns the value on success, or FALSE if the given option is not supported.ExampleThe following is an example −
75 Views
The ftp_fget() function is used to upload from an open file and saves it to a file on the FTP server.Syntaxftp_fput(con,remote_file,open_file,mode,startpos);Parameterscon − The FTP connectionremote_file − The file path to upload toopen_file − The open local filemode − The transfer modestartpos − The position to begin downloading fromReturnThe ftp_fget() function returns TRUE on success and FALSE on failure.ExampleThe following is an example wherein we will download server file “demo.txt” and save it to open local file “new.txt” −