HTTP_Download::setResource

HTTP_Download::setResource() – Set resource for download

Synopsis

mixed HTTP_Download::setResource ( mixed $handle = null )

Description

Set the resource handle to retrieve the data for the download.

The resource handle supplied will be closed after sending the download.

Set $handle to null if you want to unset.

This cannot be used with resources of databases that populate their BLOBs as resource handles like PostgreSQL. A possible solution would be to write a stream wrapper.

Returns a PEAR_Error if $handle is no valid resource or not null.

Parameter

  • mixed $handle = null - (int) resource handle or null

Return value

Returns TRUE on success, PEAR_Error on failure.

Note

This function can not be called statically.

Set raw data (Previous) Whether to gzip the download on the fly or not. (requires ext/zlib) (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.