ref.pdo-dblib.connection.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 102 行
HTML
102 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Connecting to Microsoft SQL Server and Sybase databases</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="ref.pdo-dblib.html">MS SQL Server (PDO)</a></div> <div class="next" style="text-align: right; float: right;"><a href="ref.pdo-firebird.html">Firebird/Interbase (PDO)</a></div> <div class="up"><a href="ref.pdo-dblib.html">MS SQL Server (PDO)</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="ref.pdo-dblib.connection" class="refentry"> <div class="refnamediv"> <h1 class="refname">PDO_DBLIB DSN</h1> <p class="verinfo">(No version information available, might be only in CVS)</p><p class="refpurpose"><span class="refname">PDO_DBLIB DSN</span> — <span class="dc-title">Connecting to Microsoft SQL Server and Sybase databases</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <p class="para"> The PDO_DBLIB Data Source Name (DSN) is composed of the following elements: <dl> <dt> <span class="term">DSN prefix</span> <dd> <p class="para"> The DSN prefix is <strong class="userinput"><code>sybase:</code></strong> if PDO_DBLIB was linked against the FreeTDS libraries, <strong class="userinput"><code>mssql:</code></strong> if PDO_DBLIB was linked against the Microsoft SQL Server libraries, or <strong class="userinput"><code>dblib:</code></strong> if linked against any other variety of DB-lib. </p> </dd> </dt> <dt> <span class="term"><b><tt>host</tt></b></span> <dd> <p class="para"> The hostname on which the database server resides. </p> </dd> </dt> <dt> <span class="term"><b><tt>dbname</tt></b></span> <dd> <p class="para"> The name of the database. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example"> <p><b>Example #1 PDO_DBLIB DSN examples</b></p> <div class="example-contents"><p> The following examples show a PDO_DBLIB DSN for connecting to Microsoft SQL Server and Sybase databases: <div class="example-contents"><div class="cdata"><pre>mssql:host=localhost;dbname=testdbsybase:host=localhost;dbname=testdbdblib:host=localhost;dbname=testdb</pre></div> </div> </p></div> </div> </p> </div> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ref.pdo-dblib.html">MS SQL Server (PDO)</a></div> <div class="next" style="text-align: right; float: right;"><a href="ref.pdo-firebird.html">Firebird/Interbase (PDO)</a></div> <div class="up"><a href="ref.pdo-dblib.html">MS SQL Server (PDO)</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?