note 86872 added to function.ftp-fput
| From: | rok dot meglic at gmail dot com | Date: | Fri, 07 Nov 2008 12:35:12 +0000 |
| Subject: | note 86872 added to function.ftp-fput | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-146276@lists.php.net to get a copy of this message | ||
Make sure you chdir to remote directory before using ftp_put or else ftp_put will just return error
that it cannot create file. After you do the chdir you should NOT pass the whole path of file to
ftp_put but just basename (filename). See example for more info.
Example:
<?php
$locpath = 'local_path/resources/js/test.js';
$rempath = 'resources/js/';
$remFile = 'test.js';
ftp_chdir($this->conn_id, $rempath);
ftp_put($this->conn_id, $remFile, $locpath, FTP_BINARY);
?>
----
Server IP: 69.147.83.197
Probable Submitter: 88.200.89.49
----
Manual Page -- http://www.php.net/manual/en/function.ftp-fput.php
Edit -- https://master.php.net/note/edit/86872
Del: integrated -- https://master.php.net/note/delete/86872/integrated
Del: useless -- https://master.php.net/note/delete/86872/useless
Del: bad code -- https://master.php.net/note/delete/86872/bad+code
Del: spam -- https://master.php.net/note/delete/86872/spam
Del: non-english -- https://master.php.net/note/delete/86872/non-english
Del: in docs -- https://master.php.net/note/delete/86872/in+docs
Del: other reasons-- https://master.php.net/note/delete/86872
Reject -- https://master.php.net/note/reject/86872
Search -- https://master.php.net/manage/user-notes.php