note 71392 added to function.ftp-rename
| From: | Hazem dot Khaled at gmail dot com | Date: | Sun, 26 Nov 2006 15:56:05 +0000 |
| Subject: | note 71392 added to function.ftp-rename | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-120089@lists.php.net to get a copy of this message | ||
to rename the file or folder you should use ftp_chdir to select the current directory on ftp server
or you should write the full path to file in old name and in new name
Ex. 1
<?php
// open the folder that have the file
ftp_chdir($conn_id, '/www/ftp-filemanager/');
// rename the file
ftp_rename($conn_id, 'file1.jpg', 'new_name_4_file.jpg');
?>
or write full path Ex. 2
<?
// rename the file
ftp_rename($conn_id, '/www/ftp-filemanager/file1.jpg',
'/www/ftp-filemanager/new_name_4_file.jpg');
?>
----
Server IP: 66.163.161.117
Probable Submitter: 196.205.191.158
----
Manual Page -- http://www.php.net/manual/en/function.ftp-rename.php
Edit -- https://master.php.net/note/edit/71392
Del: integrated -- https://master.php.net/note/delete/71392/integrated
Del: useless -- https://master.php.net/note/delete/71392/useless
Del: bad code -- https://master.php.net/note/delete/71392/bad+code
Del: spam -- https://master.php.net/note/delete/71392/spam
Del: non-english -- https://master.php.net/note/delete/71392/non-english
Del: in docs -- https://master.php.net/note/delete/71392/in+docs
Del: other reasons-- https://master.php.net/note/delete/71392
Reject -- https://master.php.net/note/reject/71392
Search -- https://master.php.net/manage/user-notes.php