note 8822 deleted from function.ftp-rename by felipe

From: Date: Mon, 21 Jul 2008 01:51:50 +0000
Subject: note 8822 deleted from function.ftp-rename by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142392@lists.php.net to get a copy of this message
Note Submitter: ---- # Simple example for ftp_rename # Warning! Not tested... $server = 'ftp.somewhere.com'; $user = 'anonymous'; $pass = 'someone@somewhere.com'; $original_name = 'file_name.txt'; $new_name = 'new_file_name.txt'; $ftp_connect = ftp_connect ($server) or die ("Could not connect to $server"); $ftp = ftp_login ($ftp_connect, $user, $pass) or die ("Authentication failed"); $rename = ftp_rename ($ftp_connect, $original_name, $new_name); if ($rename) print "$original_name renamed to $new_name."; else print "$original_name could not be renamed..."; ftp_quit ($ftp_connect);

« previous php.notes (#142392) next »