Home > PHP > Function > FTP > ftp_rename()

ftp_rename()

ftp_rename - Renames a file or a directory on the FTP server

Syntax

bool ftp_rename (resource $ftp_stream, string $oldname, string $newname)

Arguments

  • ftp_stream - The link identifier of the FTP connection.
  • oldname - The old file/directory name.
  • newname - The new name.

Description

ftp_rename() renames a file or a directory on the FTP server.

Version

PHP 4, 5

Return value

Returns TRUE on success or FALSE on failure.