<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.svn.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.svn-commit.php',
    1 => 'svn_commit',
    2 => 'Sends changes from the local working copy to the repository',
  ),
  'up' => 
  array (
    0 => 'ref.svn.php',
    1 => 'SVN Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.svn-client-version.php',
    1 => 'svn_client_version',
  ),
  'next' => 
  array (
    0 => 'function.svn-delete.php',
    1 => 'svn_delete',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/svn/functions/svn-commit.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.svn-commit" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">svn_commit</h1>
  <p class="verinfo">(PECL svn &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">svn_commit</span> &mdash; <span class="dc-title">Sends changes from the local working copy to the repository</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.svn-commit-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>svn_commit</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$log</code></span>, <span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$targets</code></span>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$recursive</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></span></span>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="simpara">
   Commits changes made in the local working copy files enumerated in
   the <code class="parameter">targets</code> array to the repository, with the
   log message <code class="parameter">log</code>. Directories in the <code class="parameter">targets</code>
   array will be recursively committed unless <code class="parameter">recursive</code>
   is set to <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
  <blockquote class="note"><p><strong class="note">Nota</strong>: 
   <span class="simpara">
    This function does not have any parameters for specifying authentication,
    so a username and password must be set using <span class="function"><a href="function.svn-auth-set-parameter.php" class="function">svn_auth_set_parameter()</a></span>
   </span>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.svn-commit-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <dl>
   
    <dt><code class="parameter">log</code></dt>
    <dd>
     <span class="simpara">
      String log text to commit
     </span>
    </dd>
   
   
    <dt><code class="parameter">targets</code></dt>
    <dd>
     <span class="simpara">
      Array of local paths of files to be committed
     </span>
     <div class="warning"><strong class="warning">Avviso</strong>
      <p class="simpara">
       This parameter must be an array, a string for a single
       target is not acceptable.
      </p>
     </div>
     <blockquote class="note"><p><strong class="note">Nota</strong>: <span class="simpara">I percorsi relativi verranno risolti se la cartella di lavoro corrente è quello che contiene il binario PHP. Per usare la cartella dello script chiamante, usare <span class="function"><a href="function.realpath.php" class="function">realpath()</a></span> o dirname(__FILE__).</span></p></blockquote>
    </dd>
   
   
    <dt><code class="parameter">recursive</code></dt>
    <dd>
     <span class="simpara">
      Boolean flag to disable recursive committing of
      directories in the <code class="parameter">targets</code> array.
      Default is <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>.
     </span>
    </dd>
   
  </dl>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.svn-commit-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="simpara">
   Returns array in form of:
  </p>
    <div class="example-contents screen">
<div class="returnvaluescode"><pre class="returnvaluescode">array(
    0 =&gt; integer revision number of commit
    1 =&gt; string ISO 8601 date and time of commit
    2 =&gt; name of committer
)</pre>
</div>
    </div>
  <p class="simpara">
   Returns <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure.
  </p>
 </div>


 

 

 <div class="refsect1 examples" id="refsect1-function.svn-commit-examples">
  <h3 class="title">Esempi</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 Basic example</strong></p>
   <div class="example-contents"><p>
    This example commits the calculator directory to a repository, using
    the username Bob and the password abc123 (hopefully, his password is
    stronger):
   </p></div>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />svn_auth_set_parameter</span><span style="color: #007700">(</span><span style="color: #0000BB">SVN_AUTH_PARAM_DEFAULT_USERNAME</span><span style="color: #007700">, </span><span style="color: #DD0000">'Bob'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">svn_auth_set_parameter</span><span style="color: #007700">(</span><span style="color: #0000BB">SVN_AUTH_PARAM_DEFAULT_PASSWORD</span><span style="color: #007700">, </span><span style="color: #DD0000">'abc123'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">svn_commit</span><span style="color: #007700">(</span><span style="color: #DD0000">'Log message of Bob\'s commit'</span><span style="color: #007700">, array(</span><span style="color: #0000BB">realpath</span><span style="color: #007700">(</span><span style="color: #DD0000">'calculator'</span><span style="color: #007700">))));<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>Il precedente esempio visualizzerà:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">array(
  0 =&gt; 1415,
  1 =&gt; &#039;2007-05-26T01:44:28.453125Z&#039;,
  2 =&gt; &#039;Bob&#039;
)</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 notes" id="refsect1-function.svn-commit-notes">
  <h3 class="title">Note</h3>
  <div class="warning"><strong class="warning">Avviso</strong><p class="simpara">Questa funzione è
<em>SPERIMENTALE</em>. Ovvero, il comportamento di questa funzione,
il nome di questa funzione, in definitiva tutto ciò che è documentato qui 
può cambiare nei futuri rilasci del PHP senza preavviso. Siete avvisati, l&#039;uso di questa
funzione è a vostro rischio.</p></div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.svn-commit-seealso">
  <h3 class="title">Vedere anche:</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.svn-auth-set-parameter.php" class="function" rel="rdfs-seeAlso">svn_auth_set_parameter()</a> - Sets an authentication parameter</span></li>
   <li><a href="http://svnbook.red-bean.com/en/1.2/svn.ref.svn.c.commit.html" class="link external">&raquo;&nbsp;SVN documentation on svn commit</a></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>