©
本文檔使用 php中文網手册 發布
(PHP 4 >= 4.2.0, PHP 5)
pg_lo_tell — 返回大型对象的当前指针位置
$large_object
)pg_lo_tell() 返回当前指针位置(大型对象中从头开始的偏移量)。
参见 pg_lo_seek() 。
[#1] Marv-CZ [2010-11-15 22:26:01]
Function to take a large object size:
<?php
function pg_lo_size ($lo) {
$pos = pg_lo_tell ($lo);
pg_lo_seek ($lo, 0, PGSQL_SEEK_END);
$size = pg_lo_tell ($lo);
pg_lo_seek ($lo, $pos, PGSQL_SEEK_SET);
return $size;
}
?>