function.svn-checkout.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 178 行
HTML
178 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Checks out a working copy from the repository</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.svn-cat.html">svn_cat</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.svn-cleanup.html">svn_cleanup</a></div> <div class="up"><a href="ref.svn.html">SVN Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.svn-checkout" class="refentry"> <div class="refnamediv"> <h1 class="refname">svn_checkout</h1> <p class="verinfo">(PECL svn:0.1-0.2)</p><p class="refpurpose"><span class="refname">svn_checkout</span> — <span class="dc-title">Checks out a working copy from the repository</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><b><b>svn_checkout</b></b></span> ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$repos</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$targetpath</tt></span> [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$revision</tt></span> [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$flags</tt></span> ]] )</div> <p class="para rdfs-comment"> Checks out a working copy from the repository at <i><tt class="parameter">repos</tt></i> to <i><tt class="parameter">targetpath</tt></i> at revision <i><tt class="parameter">revision</tt></i>. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">repos</tt></i></span> <dd> <p class="para"> String URL path to directory in repository to check out. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">targetpath</tt></i></span> <dd> <p class="para"> String local path to directory to check out in to </p> <blockquote><p><b class="note">Note</b>: <span class="simpara">Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script's working directory, use <a href="function.realpath.html" class="function">realpath()</a> or dirname(__FILE__).</span></p></blockquote> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">revision</tt></i></span> <dd> <p class="para"> Integer revision number of repository to check out. Default is HEAD, the most recent revision. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">flags</tt></i></span> <dd> <p class="para"> Any combination of <b><tt>SVN_NON_RECURSIVE</tt></b> and <b><tt>SVN_IGNORE_EXTERNALS</tt></b>. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <b><tt>TRUE</tt></b> on success or <b><tt>FALSE</tt></b> on failure. </p> </div> <div class="refsect1 notes"> <h3 class="title">Notes</h3> <div class="warning"><b class="warning">Warning</b><p class="simpara">This function is<em class="emphasis">EXPERIMENTAL</em>. The behaviour of this function, its name, andsurrounding documentation may change without notice in a future release of PHP.This function should be used at your own risk.</p></div> </div> <div class="refsect1 examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example"> <p><b>Example #1 Basic example</b></p> <div class="example-contents"><p> This example demonstrates how to check out a directory from a repository to a directory named calc: </p></div> <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB"><?php<br />svn_checkout</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://www.example.com/svnroot/calc/trunk'</span><span style="color: #007700">, </span><span style="color: #0000BB">dirname</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">) . </span><span style="color: #DD0000">'/calc'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span></span></code></div> </div> <div class="example-contents"><p> The <i>dirname(__FILE__)</i> call is necessary in order to convert the calc relative path into an absolute one. If calc exists, you can also use <a href="function.realpath.html" class="function">realpath()</a> to retrieve an absolute path. </p></div> </div> </p> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="function.svn-add.html" class="function" rel="rdfs-seeAlso">svn_add()</a></li> <li class="member"><a href="function.svn-commit.html" class="function" rel="rdfs-seeAlso">svn_commit()</a></li> <li class="member"><a href="function.svn-status.html" class="function" rel="rdfs-seeAlso">svn_status()</a></li> <li class="member"><a href="function.svn-update.html" class="function" rel="rdfs-seeAlso">svn_update()</a></li> <li class="member"><a href="http://svnbook.red-bean.com/en/1.2/svn.ref.svn.c.checkout.html" class="link external">» SVN documentation on svn checkout</a></li> </ul> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.svn-cat.html">svn_cat</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.svn-cleanup.html">svn_cleanup</a></div> <div class="up"><a href="ref.svn.html">SVN Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?