note 83302 added to function.ftp-fput

From: Date: Tue, 20 May 2008 07:57:52 +0000
Subject: note 83302 added to function.ftp-fput
Groups: php.notes 
Request: Send a blank email to php-notes+get-139546@lists.php.net to get a copy of this message
When you have your file contents as a string, create temporary stream and use that as a file handle. <?php $contents = "This is a test file\nTesting 1,2,3.."; $tempHandle = fopen('php://temp', 'r+'); fwrite($tempHandle, $contents); rewind($tempHandle); ftp_fput($this->ftp, $filename, $tempHandle, FTP_ASCII); ?> ---- Server IP: 80.81.171.181 Probable Submitter: 83.145.208.186 ---- Manual Page -- http://www.php.net/manual/en/function.ftp-fput.php Edit -- https://master.php.net/note/edit/83302 Del: integrated -- https://master.php.net/note/delete/83302/integrated Del: useless -- https://master.php.net/note/delete/83302/useless Del: bad code -- https://master.php.net/note/delete/83302/bad+code Del: spam -- https://master.php.net/note/delete/83302/spam Del: non-english -- https://master.php.net/note/delete/83302/non-english Del: in docs -- https://master.php.net/note/delete/83302/in+docs Del: other reasons-- https://master.php.net/note/delete/83302 Reject -- https://master.php.net/note/reject/83302 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#139546) next »