PHP Velho Oeste 2024

OCILob::read

(PHP 5, PHP 7, PHP 8, PECL OCI8 >= 1.1.0)

OCILob::readラージオブジェクトの一部を読み込む

説明

OCILob::read ( int $length ) : string|false

LOB の内部ポインタの現在位置から length バイト読み込みます。

length バイトが読み込まれた、 あるいはラージオブジェクトの終わりに達したとき、読み込みを停止します。 ラージオブジェクトの内部ポインタは、 読み込まれたバイト数分だけシフトされます。

パラメータ

length

読み込むバイト数。大きな値を指定すると、1 MB に切り捨てられます。

返り値

読み込んだ内容を表す文字列、失敗した場合に false を返します

変更履歴

バージョン 説明
8.0.0, PECL OCI8 3.0.0 OCI-Lob クラスは、 PHP の名前付けの規約に従って OCILob に名前が変更されました。
add a note add a note

User Contributed Notes 2 notes

up
1
Marcin Matras
11 years ago
To read LOB into variable you can use OCI-Lob::load

<?php
$foo
= $MyBlob->load();
?>
up
-4
alvaro at demogracia dot com
15 years ago
To read the whole LOB into a variable:

<?php
$foo
= $MyBlob->read($MyBlob->size());
?>
To Top