note 3782 deleted from FTP functions by ronabop

From: Date: Sat, 02 Sep 2000 04:10:55 +0000
Subject: note 3782 deleted from FTP functions by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-3916@lists.php.net to get a copy of this message
Here is an example that works: <p> $connid = ftp_connect("$host"); if (!$connid) { echo "Error: Ftp connection has failed!rn"; die; } echo "Connected! [ID: $connid]rnAttempting logon...rn"; // Attempt login. False = error $result = ftp_login($connid, "$user", "$pass"); if (!$result) { echo "Error: Ftp logon for user [$user] has failed!rn"; ftp_quit($connid); die; } echo "User [$user] logged in successfuly!rnrn"; echo "Putting [./sourcefile.zip] on remote server..."; $success = ftp_put($connid, "./targetfile.zip", "./sourcefile.zip", FTP_BINARY); // Finally, close the FTP stream ftp_quit($connid);

« previous php.notes (#3916) next »