ConFoo Montreal 2026: Call for Papers

Voting

: six minus two?
(Example: nine)

The Note You're Voting On

roy at user dot nl
12 years ago
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);

?>

<< Back to user notes page

To Top