<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.dir.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.chroot.php',
    1 => 'chroot',
    2 => 'Wechselt das Wurzelverzeichnis',
  ),
  'up' => 
  array (
    0 => 'ref.dir.php',
    1 => 'Verzeichnis-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.chdir.php',
    1 => 'chdir',
  ),
  'next' => 
  array (
    0 => 'function.closedir.php',
    1 => 'closedir',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/dir/functions/chroot.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.chroot" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">chroot</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">chroot</span> &mdash; <span class="dc-title">Wechselt das Wurzelverzeichnis</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.chroot-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>chroot</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$directory</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Wechselt das Wurzelverzeichnis des aktuellen Prozesses zu
   <code class="parameter">directory</code>, und wechselt das aktuelle
   Arbeitsverzeichnis zu &quot;/&quot;.
  </p>
  <p class="para">
   Diese Funktion ist nur unter GNU- und BSD-Systemen verfügbar und nur bei
   Verwendung der CLI-, CGI- oder Embed-SAPI. Zusätzlich benötigt die Funktion
   Root-Rechte.
  </p>
  <p class="para">
   Der Aufruf dieser Funktion ändert nicht die Werte der magischen Kontanten
   <code class="literal">__DIR__</code> und <code class="literal">__FILE__</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.chroot-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">directory</code></dt>
     <dd>
      <p class="para">
       Der Pfad, zu dem das Wurzelverzeichnis geändert werden soll.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.chroot-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt bei Erfolg <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.chroot-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1"><p><strong>Beispiel #1 <span class="function"><strong>chroot()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />chroot</span><span style="color: #007700">(</span><span style="color: #DD0000">"/pfad/zu/ihrem/chroot/"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">getcwd</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">/</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.chroot-notes">
  <h3 class="title">Anmerkungen</h3>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: <span class="simpara">Diese Funktion ist auf
Windows-Plattformen nicht verfügbar.</span></p></blockquote>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: <span class="simpara">Diese Funktion ist in PHP-Interpretern,
die mit ZTS (Zend Thread Safety) kompiliert wurden, nicht verfügbar. Ob das verwendete PHP mit ZTS kompiliert wurde, kann durch Aufruf von
<strong class="command">php -i</strong>, oder unter Verwendung der eingebauten Konstante <strong><code><a href="reserved.constants.php#constant.php-zts">PHP_ZTS</a></code></strong> geprüft werden.</span></p></blockquote>
 </div>


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