PHP ftp_login () function
Definition and Usage
ftp_login () function FTP server.
If successful, the function returns TRUE. If it fails, FALSE and a warning is returned.
grammar
ftp_login(ftp_connection,username,password)
参数 | 描述 |
---|---|
ftp_connection | 必需。规定要登录的 FTP 连接。 |
username | 必需。规定用于登录的用户名。 |
password | 必需。规定用于登录的密码。 |
Examples
<?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