function.udm-alloc-agent.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 132 行
HTML
132 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Allocate mnoGoSearch session</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.udm-alloc-agent-array.html">udm_alloc_agent_array</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.udm-api-version.html">udm_api_version</a></div> <div class="up"><a href="ref.mnogosearch.html">mnoGoSearch Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.udm-alloc-agent" class="refentry"> <div class="refnamediv"> <h1 class="refname">udm_alloc_agent</h1> <p class="verinfo">(PHP 4 >= 4.0.5, PHP 5 <= 5.0.5, PECL mnogosearch:1.0.0)</p><p class="refpurpose"><span class="refname">udm_alloc_agent</span> — <span class="dc-title">Allocate mnoGoSearch session</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>udm_alloc_agent</b></b></span> ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$dbaddr</tt></span> [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$dbmode</tt></span> ] )</div> <p class="para rdfs-comment"> Allocate a mnoGoSearch session. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">dbaddr</tt></i></span> <dd> <p class="para"> <i><tt class="parameter">dbaddr</tt></i> - URL-style database description, with options (type, host, database name, port, user and password) to connect to SQL database. Do not matter for built-in text files support. Format for <i><tt class="parameter">dbaddr</tt></i>: <i>DBType:[//[DBUser[:DBPass]@]DBHost[:DBPort]]/DBName/</i>. Currently supported DBType values are: mysql, pgsql, msql, solid, mssql, oracle, and ibase. Actually, it does not matter for native libraries support, but ODBC users should specify one of the supported values. If your database type is not supported, you may use <i>unknown</i> instead. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">dbmode</tt></i></span> <dd> <p class="para"> <i><tt class="parameter">dbmode</tt></i> - You may select the SQL database mode of words storage. Possible values of <i><tt class="parameter">dbmode</tt></i> are: <i>single</i>, <i>multi</i>, <i>crc</i>, or <i>crc-multi</i>. When <i>single</i> is specified, all words are stored in the same table. If <i>multi </i> is selected, words will be located in different tables depending of their lengths. "multi" mode is usually faster, but requires more tables in the database. If "crc" mode is selected, mnoGoSearch will store 32 bit integer word IDs calculated by CRC32 algorithm instead of words. This mode requires less disk space and it is faster comparing with "single" and "multi" modes. <i>crc-multi</i> uses the same storage structure with the "crc" mode, but also stores words in different tables depending on words lengths like in "multi" mode. </p> </dd> </dt> </dl> </p> <blockquote><p><b class="note">Note</b>: <i><tt class="parameter">dbaddr</tt></i> and <i><tt class="parameter">dbmode</tt></i> must match those used during indexing. <br /> </p></blockquote> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns a mnogosearch agent identifier on success, <b><tt>FALSE</tt></b> on failure. This function creates a session with database parameters. </p> </div> <div class="refsect1 notes"> <h3 class="title">Notes</h3> <blockquote><p><b class="note">Note</b>: In fact this function does not open a connection to the database and thus does not check the entered login and password. Establishing a connection to the database and login/password verification is done by <a href="function.udm-find.html" class="function">udm_find()</a>. <br /> </p></blockquote> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.udm-alloc-agent-array.html">udm_alloc_agent_array</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.udm-api-version.html">udm_api_version</a></div> <div class="up"><a href="ref.mnogosearch.html">mnoGoSearch Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?