Found 34490 Articles for Programming

ftp_rmdir() function in PHP

Samual Sam
Updated on 30-Jul-2019 22:30:24

44 Views

The ftp_rmdir() function deletes a directory on the FTP server. Remember that the directory to be deleted should be empty.Syntaxftp_rmdir(conn,dir);Parametersconn −The FTP connectiondir − The empty directory to be deleted.ReturnThe ftp_rmdir() function returnsTRUE on success or FALSE on failure.ExampleThe following is an example −

ftp_rename() function in PHP

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

222 Views

The ftp_rename() function renames a file or directory on the FTP server.Syntaxftp_rename(conn,oldname,newname);Parametersconn − The FTP connectionold_name − The file or directory to rename.new_name − The new name of the file or directoryReturnThe ftp_rename() function returns TRUE on success or FALSE on failure.ExampleThe following is an example −

ftp_rawlist() function in PHP

Samual Sam
Updated on 30-Jul-2019 22:30:24

55 Views

The ftp_rawlist() function displays the list of files with file information from a specified directorySyntaxftp_rawlist(conn,dir,recursive);Parametersconn − The FTP connectiondir − The directory pathrecursive − Sends a "LIST" command to the server by default.ReturnThe ftp_rawlist() function returns an array where each element corresponds to one line of text.ExampleThe following is an example to get a list of files with file information −

ftp_raw() function in PHP

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

42 Views

The ftp_raw() function is used to sends raw command to the FTP server.Syntaxftp_raw(con, command)Parameterscon − The FTP connectioncommand − The command to executeReturnThe ftp_raw() function returns the server's response as an array of strings.ExampleThe following is an example −

ftp_quit() function in PHP

Samual Sam
Updated on 30-Jul-2019 22:30:24

57 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 −

ftp_pwd() function in PHP

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

40 Views

The ftp_pwd() function returns the present working directory i.e. the current directory.Syntaxftw_pwd(con)Parameterscon − The FTP connectionReturnThe ftp_pwd() function returns TRUE on success or FALSE on failure.ExampleThe following is an example −

ftp_put() function in PHP

Samual Sam
Updated on 30-Jul-2019 22:30:24

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 −

ftp_pasv() function in PHP

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

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 −

ftp_nlist() function in PHP

Samual Sam
Updated on 30-Jul-2019 22:30:24

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 −

ftp_nb_get() function in PHP

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

44 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:

Advertisements