stream_write ( $data )

Write to stream. This method is called in response to fwrite().

It is important to avoid reading files that are larger than the amount of memory allocated to PHP, otherwise “out of memory” errors will occur.

Access

public

Parameters

Parameter

Type

Required

Description

$data

string

Required

The data to write to the stream.

Returns

Type

Description

integer

The number of bytes that were written to the stream.

Source

Method defined in extensions/s3streamwrapper.class.php | Toggle source view (9 lines) | View on GitHub

public function stream_write($data)
{
    $size = strlen($data);

    $this->seek_position = $size;
    $this->buffer .= $data;

    return $this->seek_position;
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback