Re: ftp_put() problem??
| From: | Tom Chubb | Date: | Thu, 24 May 2007 06:32:56 +0000 |
| Subject: | Re: ftp_put() problem?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255491@lists.php.net to get a copy of this message | ||
On 24/05/07, Al <news@ridersite.org> wrote:
Can anyone help with this. On a Linux/Apache server. I want to simply copy a file with ftp_put() from one dir to another. To make certain I'm pointing to the correct dirs, I'm using this: print_r(ftp_nlist($conn_id, FTP_EP_DIR)); //It is the correct dir print_r(ftp_nlist($conn_id, $rpdir)); //It is the correct dir Then I'm: ftp_put($conn_id, FTP_EP_DIR .'/' . $file, $rpdir. '/' . $file, FTP_ASCII); Error msg: Warning: ftp_put(/home/xxxxx/public_html/test/EditPageIndexer.php) [ function.ftp-put]: failed to open stream: No such file or directory in /home/xxxxx/public_html/EditPage/ep_functions.inc on line 227 And the files are not copied. Owner and permissions are correct. I can make a new dir [mkdir()] in the destination dir without a problem. Manual is confusing when it calls the files "remote" and "local". Thanks.... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Are you using the correct syntax?Make sure you are specifying the remote file first, then the local file. ftp_put($conn_id, $remote_file, $file, FTP_ASCII) -- Tom Chubb tomchubb@gmail.com