ftp_login
PHP 4, PHP 5, PHP 7, PHP 8
ftp_login - Logs in to an FTP connection
Manual
ftp_login(
FTP\Connection$ftp,
string$username,
string$password ): bool
Logs in to the given FTP connection.
Parameters
- ftp
-
An FTP\Connection instance.
- username
-
The username (USER).
- password
-
The password (PASS).
Return Values
Returns true on success or false on failure. If login fails, PHP will also throw a warning.
Changelog
Version | Description |
8.1.0 | The ftp parameter expects an FTP\Connection instance now; previously, a resource was expected. |