PHP ftp_login()Functions
Complete PHP FTP Reference Manual
Definition and Usage
The ftp_login() function logs in to an FTP server.
If successful, the function returns TRUE. If it fails, it returns FALSE and a warning.
Syntax
ftp_login(ftp_connection,username,password)
| Parameters | Description |
|---|---|
| ftp_connection | Required. Specifies the FTP connection to log in to. |
| username | Required. Specifies the username to log in with. |
| password | Required. Specifies the password to log in with. |
Example
<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");
ftp_close($conn);
?>
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");
ftp_close($conn);
?>
Complete PHP FTP Reference Manual Other Extensions