uTools-Manuals/docs/php/ftok.html
2019-04-28 19:00:34 +08:00

87 lines
2.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Convert a pathname and a project identifier to a System V IPC key</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.ftok" class="refentry">
<div class="refnamediv">
<h1 class="refname">ftok</h1>
<p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">ftok</span> &mdash; <span class="dc-title">Convert a pathname and a project identifier to a System V IPC key</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.ftok-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>ftok</strong></span>
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$pathname</code></span>
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$proj</code></span>
) : <span class="type">int</span></div>
<p class="para rdfs-comment">
The function converts the <code class="parameter">pathname</code> of an existing
accessible file and a project identifier into an
<em>integer</em> for use with for example
<span class="function"><a href="shmop_open.html" class="function">shmop_open()</a></span> and other System V IPC keys.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.ftok-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">pathname</code></dt>
<dd>
<p class="para">
Path to an accessible file.
</p>
</dd>
<dt>
<code class="parameter">proj</code></dt>
<dd>
<p class="para">
Project identifier. This must be a one character string.
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.ftok-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
On success the return value will be the created key value, otherwise
<em>-1</em> is returned.
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.ftok-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="shmop_open.html" class="function" rel="rdfs-seeAlso">shmop_open()</a> - Create or open shared memory block</span></li>
<li class="member"><span class="function"><a href="sem_get.html" class="function" rel="rdfs-seeAlso">sem_get()</a> - Get a semaphore id</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>