function.oci-connect.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 216 行 · 第 1/2 页

HTML
216
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Establishes a connection to the Oracle server</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.oci-commit.html">oci_commit</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.oci-define-by-name.html">oci_define_by_name</a></div> <div class="up"><a href="ref.oci8.html">OCI8 Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.oci-connect" class="refentry"> <div class="refnamediv">  <h1 class="refname">oci_connect</h1>  <p class="verinfo">(PHP 5, PECL oci8:1.1-1.2.4)</p><p class="refpurpose"><span class="refname">oci_connect</span> &mdash; <span class="dc-title">Establishes a connection to the Oracle server</span></p> </div>  <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">resource</span> <span class="methodname"><b><b>oci_connect</b></b></span>    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$username</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$password</tt></span>   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$db</tt></span>   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$charset</tt></span>   [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$session_mode</tt></span>  ]]] )</div>  <p class="para rdfs-comment">   Returns a connection identifier needed for most other OCI calls.   </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">username</tt></i></span>     <dd>      <p class="para">       The Oracle user name.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">password</tt></i></span>     <dd>      <p class="para">       The password for <i><tt class="parameter">username</tt></i>.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">db</tt></i></span>     <dd>      <p class="para">       This optional parameter can either contain the name of the local       Oracle instance or the name of the entry in       <var class="filename">tnsnames.ora</var>.      </p>      <p class="para">       If the not specified, PHP uses environment variables       <i>ORACLE_SID</i> and <i>TWO_TASK</i> to       determine the name of local Oracle instance and location of        <var class="filename">tnsnames.ora</var> accordingly.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">charset</tt></i></span>     <dd>      <p class="para">Using Oracle server version 9.2 and greater, you canindicate <i><tt class="parameter">charset</tt></i> by parameter, which will be used in the newconnection. If you&#039;re using Oracle server &lt; 9.2, this parameter will be ignoredand the <i>NLS_LANG</i> environment variable will be used instead.</p>     </dd>    </dt>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?