(PHP 5, PHP 7, PECL OCI8 >= 1.1.0)
oci_pconnect — 使锟斤拷一锟斤拷锟街撅拷锟斤拷锟斤拷锟斤拷锟斤拷 Oracle 锟斤拷锟捷匡拷
$username
, string $password
[, string $db
[, string $charset
[, int $session_mode
]]] ) : resourceoci_pconnect() 锟斤拷锟斤拷一锟斤拷锟斤拷 Oracle 锟斤拷锟斤拷锟斤拷锟侥持撅拷锟斤拷锟接诧拷锟斤拷录锟斤拷锟街撅拷锟斤拷锟接会被锟斤拷锟藉并锟斤拷锟斤拷锟斤拷之锟斤拷锟截革拷使锟矫o拷锟斤拷锟皆斤拷锟斤拷每锟斤拷页锟斤拷锟斤拷氐锟斤拷锟斤拷摹锟揭伙拷锟斤拷锟斤拷偷锟� PHP 应锟矫筹拷锟斤拷锟斤拷锟矫匡拷锟� Apache 锟接斤拷锟教o拷锟斤拷锟斤拷 PHP FastCGI/CGI 锟斤拷锟教o拷锟斤拷锟斤拷一锟斤拷锟津开的持撅拷锟斤拷锟接碉拷 Oracle 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷息锟斤拷锟斤拷锟捷匡拷志锟斤拷锟斤拷锟�一锟节★拷
Note: 锟斤拷 OCI8 锟斤拷展锟斤拷姹� 1.1 锟金,持撅拷 Oracle 锟斤拷锟接碉拷锟斤拷锟斤拷锟斤拷锟节猴拷锟斤拷锟斤拷锟侥匡拷锟斤拷锟酵拷锟斤拷瓒拷锟斤拷锟斤拷锟斤拷锟窖★拷锟斤拷锟斤拷锟斤拷锟斤拷锟�oci8.persistent_timeout锟斤拷oci8.ping_interval 锟斤拷 oci8.max_persistent锟斤拷
锟斤拷选锟侥碉拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟角憋拷锟斤拷 Oracle 实锟斤拷锟斤拷锟斤拷锟街伙拷锟斤拷锟斤拷锟斤拷 tnsnames.ora 锟斤拷锟斤拷目锟叫碉拷锟斤拷锟街★拷锟斤拷锟矫伙拷锟街革拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟� PHP 使锟矫伙拷锟斤拷锟斤拷锟斤拷 ORACLE_SID 锟斤拷 TWO_TASK 锟斤拷锟街憋拷确锟斤拷锟斤拷锟斤拷 Oracle 实锟斤拷锟斤拷锟斤拷锟街猴拷 tnsnames.ora 锟斤拷位锟矫★拷
session_mode
锟斤拷锟斤拷锟皆版本 1.1
锟斤拷锟斤拷貌锟斤拷锟斤拷锟斤拷锟斤拷锟街碉拷锟�OCI_DEFAULT
锟斤拷OCI_SYSOPER
锟斤拷 OCI_SYSDBA
锟斤拷锟斤拷锟街革拷锟斤拷锟�
OCI_SYSOPER
锟斤拷 OCI_SYSDBA
锟斤拷锟斤拷之一锟斤拷oci_new_connect()
锟斤拷锟斤拷锟斤拷使锟斤拷锟解部锟斤拷证锟斤拷息锟斤拷锟斤拷锟斤拷权锟斤拷锟接★拷锟斤拷权锟斤拷锟斤拷默锟较憋拷锟斤拷止锟斤拷要锟斤拷锟矫o拷锟斤拷要锟斤拷
oci8.privileged_connect
锟斤拷为 On锟斤拷
使锟斤拷 Oracle 锟酵伙拷锟剿匡拷锟斤拷确锟斤拷锟街凤拷锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷锟斤拷要锟斤拷锟斤拷锟捷匡拷锟斤拷址锟斤拷锟斤拷锟狡ワ拷洹o拷锟斤拷锟斤拷匹锟戒,Oracle 锟结尽锟斤拷锟杰地斤拷锟斤拷锟捷达拷锟斤拷锟捷匡拷锟街凤拷锟斤拷锟斤拷锟斤拷转锟斤拷锟斤拷锟斤拷为锟斤拷锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷锟斤拷锟杰诧拷锟杰革拷锟斤拷锟斤拷锟矫的斤拷锟斤拷锟阶拷锟揭诧拷锟斤拷锟揭恍┦憋拷淇拷锟斤拷锟�
锟斤拷锟斤拷锟街革拷锟斤拷锟絆racle 锟酵伙拷锟斤拷锟斤拷 NLS_LANG
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷
锟斤拷锟捷此诧拷锟斤拷锟缴硷拷锟斤拷锟斤拷锟斤拷时锟戒。
oci_pconnect() 锟斤拷锟斤拷锟斤拷锟接憋拷识锟斤拷锟斤拷锟斤拷锟斤拷锟津返伙拷 FALSE
锟斤拷
Note:
锟斤拷 PHP 5.0.0 之前锟侥版本锟斤拷锟斤拷使锟斤拷 ociplogon() 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷煤锟斤拷锟斤拷锟斤拷锟饺伙拷锟斤拷茫锟轿拷锟斤拷录锟斤拷锟斤拷锟轿� oci_pconnect() 锟侥憋拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟窖憋拷锟斤拷锟斤拷锟斤拷锟斤拷锟狡硷拷使锟矫★拷
锟轿硷拷 oci_connect() 锟斤拷 oci_new_connect()锟斤拷
username
The Oracle user name.
password
The password for username
.
connection_string
锟斤拷锟斤拷要锟斤拷锟接碉拷 Oracle 实锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 » Easy Connect 锟斤拷锟斤拷锟斤拷锟斤拷 tnsnames.ora 锟侥硷拷锟叫碉拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟角憋拷锟斤拷 Oracle 实锟斤拷锟斤拷锟斤拷
锟斤拷锟斤拷锟街革拷锟斤拷锟絇HP 使锟矫伙拷锟斤拷锟斤拷锟斤拷锟斤拷确锟斤拷锟斤拷锟接碉拷 Oracle 实锟斤拷锟斤拷锟斤拷锟斤拷
TWO_TASK
锟斤拷Linux 锟铰o拷锟斤拷 LOCAL
锟斤拷Windows 锟铰o拷锟斤拷 ORACLE_SID
锟饺★拷
要使锟斤拷 Easy Connect 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷PHP 锟斤拷锟斤拷锟斤拷 Oracle 10g 锟斤拷锟斤拷甙姹撅拷目突锟斤拷丝锟斤拷锟斤拷锟斤拷锟接★拷Oracle 10g 锟斤拷 Easy Connect 锟斤拷锟斤拷式锟斤拷[//]host_name[:port][/service_name]锟斤拷Oracle 11g 锟斤拷为锟斤拷[//]host_name[:port][/service_name][:server_type][/instance_name]锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟捷匡拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟� Oracle 实锟矫筹拷锟斤拷 lsnrctl status 锟揭碉拷锟斤拷
tnsnames.ora 锟侥硷拷锟斤拷锟斤拷 Oracle Net 锟斤拷锟斤拷路锟斤拷锟叫o拷锟斤拷路锟斤拷锟斤拷锟斤拷 $ORACLE_HOME/network/admin 锟斤拷 /etc锟斤拷 锟斤拷一锟街凤拷锟斤拷锟斤拷锟斤拷锟斤拷 TNS_ADMIN 锟皆憋拷通锟斤拷 $TNS_ADMIN/tnsnames.ora 锟斤拷锟斤拷取锟斤拷锟斤拷确锟斤拷 web 锟截伙拷锟斤拷锟教可讹拷取锟斤拷锟侥硷拷锟斤拷
character_set
使锟斤拷 Oracle 锟酵伙拷锟剿匡拷锟斤拷确锟斤拷锟街凤拷锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷锟斤拷要锟斤拷锟斤拷锟捷匡拷锟斤拷址锟斤拷锟斤拷锟狡ワ拷洹o拷锟斤拷锟斤拷匹锟戒,Oracle 锟结尽锟斤拷锟杰地斤拷锟斤拷锟捷达拷锟斤拷锟捷匡拷锟街凤拷锟斤拷锟斤拷锟斤拷转锟斤拷锟斤拷锟斤拷为锟斤拷锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷锟斤拷锟杰诧拷锟杰革拷锟斤拷锟斤拷锟矫的斤拷锟斤拷锟阶拷锟揭诧拷锟斤拷锟揭恍┦憋拷淇拷锟斤拷锟�
锟斤拷锟斤拷锟街革拷锟斤拷锟絆racle 锟酵伙拷锟斤拷锟斤拷 NLS_LANG
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷
锟斤拷锟捷此诧拷锟斤拷锟缴硷拷锟斤拷锟斤拷锟斤拷时锟戒。
session_mode
锟剿诧拷锟斤拷锟斤拷 PHP 5锟斤拷PECL OCI8
1.1锟斤拷锟芥本锟斤拷始锟斤拷锟矫o拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷值锟斤拷OCI_DEFAULT
锟斤拷OCI_SYSOPER
锟斤拷 OCI_SYSDBA
锟斤拷锟斤拷为
OCI_SYSOPER
锟斤拷 OCI_SYSDBA
锟斤拷锟斤拷之一锟斤拷锟剿猴拷锟斤拷锟斤拷锟斤拷使锟斤拷锟解部锟斤拷证锟介建锟斤拷锟斤拷锟斤拷权锟斤拷锟斤拷锟接★拷锟斤拷锟斤拷权锟斤拷锟斤拷锟斤拷默锟斤拷锟角斤拷锟矫的★拷锟斤拷要锟斤拷
oci8.privileged_connect
锟斤拷为 On 锟斤拷锟斤拷锟矫★拷
PHP 5.3锟斤拷PECL OCI8 1.3.4锟斤拷锟斤拷锟斤拷锟斤拷
OCI_CRED_EXT
模式值锟斤拷使锟斤拷锟解部锟斤拷锟斤拷锟较低筹拷锟街わ拷锟斤拷锟斤拷锟� Oracle
锟斤拷锟捷匡拷锟叫斤拷锟斤拷锟斤拷锟矫★拷OCI_CRED_EXT
锟斤拷志只锟斤拷锟斤拷锟斤拷锟矫伙拷为 "/"锟斤拷锟斤拷锟斤拷为锟秸碉拷锟斤拷锟斤拷锟�oci8.privileged_connect
锟斤拷为 On 锟斤拷 Off锟斤拷
OCI_CRED_EXT
锟斤拷锟斤拷
OCI_SYSOPER
锟斤拷
OCI_SYSDBA
模式锟斤拷锟绞癸拷谩锟�
OCI_CRED_EXT
锟斤拷锟节帮拷全锟斤拷原锟斤拷支锟斤拷 Windows 系统锟斤拷
Returns a connection identifier or FALSE
on error.
Note: Starting with PHP 5.1.2 and PECL oci8 1.1, the lifetime and maximum number of persistent Oracle connections can be tuned by setting the following configuration values: oci8.persistent_timeout, oci8.ping_interval and oci8.max_persistent.
Note:
In PHP versions before 5.0.0 you must use ociplogon() instead. 锟节碉拷前锟芥本锟叫o拷锟缴的猴拷锟斤拷锟斤拷锟斤拷锟斤拷锟皆憋拷使锟矫o拷锟斤拷锟窖撅拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷使锟矫★拷