svn: /phpdoc/en/trunk/reference/dir/functions/ chroot.xml

From: Date: Sat, 06 Nov 2010 03:03:16 +0000
Subject: svn: /phpdoc/en/trunk/reference/dir/functions/ chroot.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-7377@lists.php.net to get a copy of this message
frozenfire Sat, 06 Nov 2010 03:03:16 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=305124 Log: Clarified chroot's behaviour, as well as when it is available on a system. Added an example. Changed paths: U phpdoc/en/trunk/reference/dir/functions/chroot.xml Modified: phpdoc/en/trunk/reference/dir/functions/chroot.xml =================================================================== --- phpdoc/en/trunk/reference/dir/functions/chroot.xml 2010-11-06 00:54:37 UTC (rev 305123) +++ phpdoc/en/trunk/reference/dir/functions/chroot.xml 2010-11-06 03:03:16 UTC (rev 305124) @@ -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; &note.no-windows;

« previous php.doc.cvs (#7377) next »