X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP ftp_raw() Function

PHP FTP Reference PHP FTP Reference

Example

Connect to FTP server and execute commands:

<?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");

?>

Definition and Usage

The ftp_raw() function sends a raw command to the FTP server.

Syntax

ftp_raw(ftp_connection,command);

Parameter Description
ftp_connection Required. Specifies the FTP connection to use
command Required. Specifies the command to execute


Technical Details

Return Value: Returns the server's response as an array of strings
PHP Version: 5+


PHP FTP Reference PHP FTP Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook