note 112067 added to function.ftp-fput

From: Date: Mon, 29 Apr 2013 08:22:12 +0000
Subject: note 112067 added to function.ftp-fput
Groups: php.notes 
Request: Send a blank email to php-notes+get-194654@lists.php.net to get a copy of this message
For directly inserting content into a file on an FTP host, you could also create a string stream wich streams directly to the ftp_fput function. This should create less overhead than first writing to any temp directories locally before streaming, as suggested here. <?php $string = "Your content goes here"; $stream = fopen('data://text/plain,' . $string,'r'); ftp_fput($this->connection,$pathTo,$stream, FTP_BINARY); ?> ---- Server IP: 69.147.83.199 Probable Submitter: 95.97.75.130 ---- Manual Page -- http://php.net/manual/en/function.ftp-fput.php Edit -- https://master.php.net/note/edit/112067 Del: integrated -- https://master.php.net/note/delete/112067/integrated Del: useless -- https://master.php.net/note/delete/112067/useless Del: bad code -- https://master.php.net/note/delete/112067/bad+code Del: spam -- https://master.php.net/note/delete/112067/spam Del: non-english -- https://master.php.net/note/delete/112067/non-english Del: in docs -- https://master.php.net/note/delete/112067/in+docs Del: other reasons-- https://master.php.net/note/delete/112067 Reject -- https://master.php.net/note/reject/112067 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#194654) next »