PHP ftp_rename( ) function17 Mar 2025 | 1 min read The ftp_rename() function renames a file or directory on the FTP server. This function was introduced in PHP 4. Syntax:
Return value:The ftp_rename() function returns TRUE on success or FALSE on failure. On failure, an E_WARNING error will be emitted. Example 1Output: ![]() Example 2Output: ![]() Example 3Output: ![]() Next TopicPHP FTP |
PHP ftp_rmdir( ) function The function is used to delete a directory on the FTP server. This function was introduced in PHP 4. Syntax: bool ftp_rmdir ( resource $ftp_stream , string $directory ); Parameter Description Is compulsory ftp_stream The link identifier of the FTP connection. compulsory directory The directory to delete. This must be either...
1 min read
PHP Function The function is used to allocate space for a file to be uploaded to the FTP server. This function was introduced in PHP 5. Syntax: bool ftp_alloc ( resource $ftp_stream , int $filesize [, string &$result ] ); Parameter Description Is compulsory ftp_stream The link identifier of the FTP connection. compulsory file_size The...
1 min read
PHP Function The function is used to logs in to the specified FTP connection. This function was introduced in PHP 4. Syntax: bool ftp_login ( resource $ftp_stream , string $username , string $password ); Parameter Description Is compulsory ftp_stream The link identifier of the FTP connection. compulsory username The username(USER). compulsory password The password(PASS). compulsory Return value: This function returns TRUE...
1 min read
PHP Function The function returns a list of file in the given directory. This function was introduced in PHP 7.2.0. Syntax: array ftp_mlsd ( resource $ftp_stream , string $directory ); Parameter Description Is compulsory ftp_stream The link identifier of the FTP connection. compulsory directory The directory to be listed. compulsory Return value: The function returns an array...
1 min read
PHP ftp_get( ) Function The function is used to download a file from the FTP server. The function retrieves a remote file from the FTP server, and saves it into a local file. This function was introduced in PHP 4. Syntax: bool ftp_get ( resource $ftp_stream ,...
2 min read
PHP Function The function is used to change the current directory to the parent directory. This function was introduced in PHP 4. Syntax: bool ftp_cdup ( resource $ftp_stream ); Parameter Description Is compulsory ftp_stream The link identifier of the FTP connection. compulsory Returns The ftp_cdup( ) function returns TRUE on success or FALSE on failure. Example...
1 min read
PHP ftp_fput( ) Function The function is used to uploads from an open file to the FTP server. This function was introduced in PHP 4. Syntax: bool ftp_fput ( resource $ftp_stream , string $remote_file , resource $handle [, int $mode = FTP_IMAGE [, int $startpos = 0 ]]...
1 min read
PHP FTP The FTP functions give the client access to file servers through the File Transfer Protocol (FTP). functions are meant to allow you to access FTP files servers through a PHP script. FTP functions can be used to login, close connections, upload, rename, delete, download, get info...
2 min read
PHP Function The function is used to closes an FTP connection or given link. This function introduced in PHP 4.2.0 Syntax: bool ftp_close ( resource $ftp_stream ); Parameter Description Is compulsory ftp_connection/ftp_stream The link identifier of the FTP connection. compulsory Returns The ftp_close( ) function returns TRUE on success or FALSE on failure. Important note: After...
1 min read
PHP Function The function is used to set permissions on a specified remote file via FTP. This function was introduced in PHP 5. Syntax: int ftp_chmod ( resource $ftp_stream , int $mode , string $filename ); Parameter Description Is compulsory ftp_connection/stream The link identifier of the FTP connection. compulsory mode The new permissions, given as...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India