Home > PHP > Function > FTP > ftp_login()

ftp_login()

ftp_login - Logs in to an FTP connection

Syntax

bool ftp_login (resource $ftp_stream, string $username, string $password)

Arguments

  • ftp_stream - The link identifier of the FTP connection.
  • username - The username ( USER).
  • password - The password ( PASS).

Description

Logs in to the given FTP stream.

Version

PHP 4, 5

Return value

Returns TRUE on success or FALSE on failure. If login fails, PHP will also throw a warning.