note 104422 added to function.ssh2-sftp

From: Date: Tue, 14 Jun 2011 20:16:01 +0000
Subject: note 104422 added to function.ssh2-sftp
Groups: php.notes 
Request: Send a blank email to php-notes+get-180532@lists.php.net to get a copy of this message
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); } ---- Server IP: 69.147.83.197 Probable Submitter: 150.164.61.44 ---- Manual Page -- http://www.php.net/manual/en/function.ssh2-sftp.php Edit -- https://master.php.net/note/edit/104422 Del: integrated -- https://master.php.net/note/delete/104422/integrated Del: useless -- https://master.php.net/note/delete/104422/useless Del: bad code -- https://master.php.net/note/delete/104422/bad+code Del: spam -- https://master.php.net/note/delete/104422/spam Del: non-english -- https://master.php.net/note/delete/104422/non-english Del: in docs -- https://master.php.net/note/delete/104422/in+docs Del: other reasons-- https://master.php.net/note/delete/104422 Reject -- https://master.php.net/note/reject/104422 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#180532) next »