note 104422 deleted from function.ssh2-sftp by danbrown

From: Date: Wed, 15 Jun 2011 16:49:55 +0000
Subject: note 104422 deleted from function.ssh2-sftp by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-180557@lists.php.net to get a copy of this message
Note Submitter: eloisalgado at gmail dot com ---- If you have to receive larger files, instead of using fread, that has a chunk size (usually 8192 bytes), use the copy function. Besides that, the code looks much better. See more about copy(): http://www.php.net/manual/en/function.copy.php public function receiveFile($remote_file, $local_file) { $sftp = $this->sftp; copy("ssh2.sftp://$sftp$remote_file", $local_file); }

« previous php.notes (#180557) next »