ftp_raw
Send a raw command to the FTP server.
ftp_raw()
function sends a raw command to the FTP server.
<?php $conn = ftp_connect("ftp.testftp.com") or die("Could not connect"); print_r (ftp_raw($conn,"USER admin")); print_r (ftp_raw($conn,"PASS ert456")); ftp_close($conn); ?>
输出:
Array ([0] => 331 User admin, password please) Array ([0] => 230 Password Ok, User logged in)
ftp_raw ( ftp_connection , command )
parameter | describe |
---|---|
ftp_connection | Required. Specifies the FTP connection to be used (the identifier of the FTP connection). |
Command | Required. Specify the orders to be executed. |