(PHP 4 >= 4.2.0, PHP 5, PHP 7)
pg_lo_import — 锟斤拷锟侥硷拷锟斤拷锟斤拷为锟斤拷锟酵讹拷锟斤拷
pg_lo_import() creates a new large object in the database using a file on the filesystem as its data source.
要使锟矫达拷锟酵讹拷锟斤拷lo锟斤拷锟接口o拷锟斤拷要锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟叫★拷
Note: 锟斤拷锟斤拷锟斤拷 锟斤拷全模式时锟斤拷 PHP 锟斤拷锟介被锟斤拷锟斤拷锟斤拷锟侥硷拷锟斤拷目录锟角凤拷锟诫被执锟叫的脚憋拷锟斤拷锟斤拷同锟斤拷 UID锟斤拷锟斤拷锟斤拷锟竭o拷锟斤拷
Note:
锟斤拷锟斤拷锟斤拷锟斤拷前锟斤拷锟斤拷锟斤拷为 pg_loimport()锟斤拷
connection
PostgreSQL database connection resource. When
connection
is not present, the default connection
is used. The default connection is the last connection made by
pg_connect() or pg_pconnect().
pathname
锟斤拷锟斤拷指锟斤拷锟斤拷要锟斤拷锟斤拷为锟斤拷锟酵讹拷锟斤拷锟斤拷募锟斤拷锟斤拷锟�
object_id
If an object_id
is given the function
will try to create a large object with this id, else a free
object id is assigned by the server. The parameter
was added in PHP 5.3 and relies on functionality that first
appeared in PostgreSQL 8.1.
锟斤拷锟斤拷晒锟斤拷蚍祷锟斤拷陆锟斤拷拇锟斤拷投锟斤拷锟斤拷 OID锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷蚍祷锟� FALSE
锟斤拷
锟芥本 | 说锟斤拷 |
---|---|
5.3.0 |
The optional |
4.2.0 | 锟斤拷 PHP 4.2.0 锟芥本之前锟斤拷锟斤拷锟斤拷锟斤拷锟斤法锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷锟铰讹拷锟藉:
pg_lo_import
( string
$pathname
[, resource $connection
] ) : int |
Example #1 pg_lo_import() 锟斤拷锟斤拷
<?php
$database = pg_connect("dbname=jacarta");
pg_query($database, "begin");
$oid = pg_lo_import($database, '/tmp/lob.dat');
pg_query($database, "commit");
?>