Función PHP ftp_raw()
Ejemplo
Conéctese al servidor FTP y ejecute los comandos:
<?php
// connect to FTP server
$ftp_server = "ftp.example.com";
$ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
// the two lines below is the same as: ftp_login($ftp_conn,"john","secretpassword");
ftp_raw($ftp_conn, "USER john");
ftp_raw($ftp_conn, "PASS secretpassword");
?>
Definición y uso
La función ftp_raw() envía un comando sin formato al servidor FTP.
Sintaxis
ftp_raw(ftp_conn, command);
Valores paramétricos
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
command | Required. Specifies the command to execute |
Detalles técnicos
Valor devuelto: | La respuesta del servidor como una matriz de cadenas |
---|---|
Versión PHP: | 5+ |
❮ Referencia PHP FTP