note 33243 deleted from function.ftp-get by didou

From: Date: Fri, 20 Jun 2003 09:16:09 +0000
Subject: note 33243 deleted from function.ftp-get by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-50703@lists.php.net to get a copy of this message
Note Submitter: justin at pfusch dot ca ---- 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.

« previous php.notes (#50703) next »