note 33243 added to function.ftp-get
| From: | justin at rack1 dot php dot net | Date: | Thu, 19 Jun 2003 22:29:45 +0000 |
| Subject: | note 33243 added to function.ftp-get | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50687@lists.php.net to get a copy of this message | ||
In response to the first message, that's not wholly true. The file will be saved to whatever
directory you speficy with the ftp_get function for the local file argument. If you just supply a
filename, then yes, it will copy to the current folder. Personally, I generate a folder variable
beforehand like:
$destdir = "/var/www/html/storage/";
$file = "hello.txt";
ftp_get($ftplink, $destdir.$file, $file, FTP_ASCII);
A large part of why I do this is because the stuff I am working with is a large list of files coming
from a text file, then it gets dumped into destdir depending on certain variables that come up
during the process.
So, don't get the idea that you have to chdir to put ftp_get a file somewhere other than cwd.
----
Manual Page -- http://www.php.net/manual/en/function.ftp-get.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33243
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33243&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33243&report=yes