mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Clarified chroot's behaviour, as well as when it is available on a system. Added an example.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@305124 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
55884886a1
commit
82b58eb34a
1 changed files with 27 additions and 4 deletions
|
@ -15,11 +15,12 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
Changes the root directory of the current process to
|
||||
<parameter>directory</parameter>.
|
||||
<parameter>directory</parameter>, and changes the current
|
||||
working directory to "/".
|
||||
</para>
|
||||
<para>
|
||||
This function is only available if your system supports it and
|
||||
you're using the CLI, CGI or Embed SAPI. Also, this function
|
||||
This function is only available to GNU and BSD systems, and
|
||||
only when using the CLI, CGI or Embed SAPI. Also, this function
|
||||
requires root privileges.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -32,7 +33,7 @@
|
|||
<term><parameter>directory</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The new directory
|
||||
The path to change the root directory to.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -47,6 +48,28 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example><title></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
chroot("/path/to/your/chroot/");
|
||||
echo getcwd();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
/
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.no-windows;
|
||||
|
|
Loading…
Reference in a new issue