The ftp_raw() function sends a raw command to the FTP server.
ftp_raw(ftp_connection,command)
parameter | describe |
---|---|
ftp_connection | Required. Specifies the FTP connection to use. |
command | Required. Specifies the order to be executed. |
Note: This function returns the server's response as a string array. No parsing is performed, and ftp_raw() does not check whether the command is correct.
<?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);?>
The above code will output:
Array ([0] => 331 User admin, password please)Array ([0] => 230 Password Ok, User logged in)