PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<ora_logoffora_numcols>
Last updated: Mon, 16 Jul 2012

ora_logon

(PHP 3, PHP 4, PHP 5)

ora_logon -- 打开一个 Oracle 连接

描述

int ora_logon ( string user, string password )

用给定的用户名 user 和密码 password 在 PHP 和一个 Oracle 数据库之间建立一个连接。

可以通过使用 TNS 名作为参数 user 来使用 SQL*Net 建立连接。请看下面的示例:

<?php
$conn
= Ora_Logon("user@TNSNAME", "pass");
?>

如果要在字符数据中使用非 ASCII 字符,则必须在环境变量中设置 NLS_LANG。 就服务器而言,必须在服务器启动之前设置 NLS_LANG 服务器环境变量。

如果连接成功则返回连接索引,如果不能连接则返回 FALSE。错误的细节能够使用 ora_error()ora_errorcode() 函数取得。




<ora_logoffora_numcols>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST