PHP ftp_rename( ) function

The ftp_rename() function renames a file or directory on the FTP server. This function was introduced in PHP 4.

Syntax:

ParameterDescriptionIs compulsory
ftp_streamThe link identifier of the FTP connection.compulsory
oldnameThe old file/directory name.compulsory
newnameThe new namecompulsory

Return value:

The ftp_rename() function returns TRUE on success or FALSE on failure. On failure, an E_WARNING error will be emitted.

Example 1

Output:

PHP ftp_rename( ) function

Example 2

Output:

PHP ftp_rename( ) function

Example 3

Output:

PHP ftp_rename( ) function
Next TopicPHP FTP




Latest Courses