cvs: phpdoc /en/reference/dir/functions chdir.xml

From: Date: Mon, 13 Oct 2003 09:52:52 +0000
Subject: cvs: phpdoc /en/reference/dir/functions chdir.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969356582@lists.php.net to get a copy of this message
vincent Mon Oct 13 05:52:52 2003 EDT Modified files: /phpdoc/en/reference/dir/functions chdir.xml Log: Adding example Index: phpdoc/en/reference/dir/functions/chdir.xml diff -u phpdoc/en/reference/dir/functions/chdir.xml:1.4 phpdoc/en/reference/dir/functions/chdir.xml:1.5 --- phpdoc/en/reference/dir/functions/chdir.xml:1.4 Sun Jan 26 20:00:18 2003 +++ phpdoc/en/reference/dir/functions/chdir.xml Mon Oct 13 05:52:52 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/dir.xml, last change in rev 1.2 --> <refentry id="function.chdir"> <refnamediv> @@ -15,6 +15,35 @@ <para> Changes PHP's current directory to <parameter>directory</parameter>. &return.success;. + </para> + <para> + <example> + <title><function>chdir</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +// current directory +echo getcwd() . "\n"; + +chdir ('public_html'); + +// current direcorty +echo getcwd() . "\n"; + +?> +]]> + </programlisting> + <para> + This example will output + </para> + <screen> +<![CDATA[ +/home/vincent +/home/vincent/public_html +]]> + </screen> + </example> </para> <para> See also <function>getcwd</function>.

« previous php.doc (#969356582) next »