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

143 lines
4.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>建立符号连接</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.symlink" class="refentry">
<div class="refnamediv">
<h1 class="refname">symlink</h1>
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">symlink</span> &mdash; <span class="dc-title">建立符号连接</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.symlink-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>symlink</strong></span>
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$target</code></span>
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$link</code></span>
) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
<span class="function"><strong>symlink()</strong></span> 对于已有的
<code class="parameter">target</code> 建立一个名为
<code class="parameter">link</code> 的符号连接。
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.symlink-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">target</code></dt>
<dd>
<p class="para">
连接的目标。
</p>
</dd>
<dt>
<code class="parameter">link</code></dt>
<dd>
<p class="para">
连接的名称。
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.symlink-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
成功时返回 <strong><code>TRUE</code></strong> 或者在失败时返回 <strong><code>FALSE</code></strong>
</p>
</div>
<div class="refsect1 changelog" id="refsect1-function.symlink-changelog">
<h3 class="title">更新日志</h3>
<p class="para">
<table class="doctable informaltable">
<thead>
<tr>
<th>版本</th>
<th>说明</th>
</tr>
</thead>
<tbody class="tbody">
<tr>
<td>5.3.0</td>
<td>
此函数在 Windows 平台上可用Vista、Server
2008 或更高版本)。
</td>
</tr>
</tbody>
</table>
</p>
</div>
<div class="refsect1 examples" id="refsect1-function.symlink-examples">
<h3 class="title">范例</h3>
<p class="para">
<div class="example" id="example-2846">
<p><strong>Example #1 创建一个符号连接</strong></p>
<div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$target&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'uploads.php'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$link&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'uploads'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">symlink</span><span style="color: #007700">(</span><span style="color: #0000BB">$target</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$link</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #0000BB">readlink</span><span style="color: #007700">(</span><span style="color: #0000BB">$link</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
</div>
</div>
</p>
</div>
<div class="refsect1 notes" id="refsect1-function.symlink-notes">
<h3 class="title">注释</h3>
<blockquote class="note"><p><strong class="note">Note</strong>:
<span class="simpara">
仅针对 Windows运行 PHP 于Vista、Server
2008 或更高版本才能正常使用。
之前版本的 Windows 不支持符号连接。
</span>
</p></blockquote>
</div>
<div class="refsect1 seealso" id="refsect1-function.symlink-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="link.html" class="function" rel="rdfs-seeAlso">link()</a> - 建立一个硬连接</span></li>
<li class="member"><span class="function"><a href="readlink.html" class="function" rel="rdfs-seeAlso">readlink()</a> - 返回符号连接指向的目标</span></li>
<li class="member"><span class="function"><a href="linkinfo.html" class="function" rel="rdfs-seeAlso">linkinfo()</a> - 获取一个连接的信息</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>