OCI-Lob::load

(PHP 5, PECL OCI8 >= 1.1.0)

OCI-Lob::load — Returns large object's contents

Descrizione

stringOCI-Lob::load
( void
)

Returns large object's contents. As script execution is terminated
when the memory_limit is reached,
ensure that the LOB does not exceed this limit. In most cases it's
recommended to use OCI-Lob::read instead.

I'll give you example how to download a file from db without storing it on server's FS:
It works like this - point yor browser to index.php?name=file.ext
Just make sure that file "file.ext" exists in your db!

Code:

<?php

$dbConnection=ocilogon('user','pass','data.world'); //login stuff
$sql_SelectBlob='select document_body,filename from tdocuments where id=1'; //selecting a blob field named 'document_body' with id = 1
$statement=OCIParse($dbConnection,$sql_SelectBlob);