aidan Wed Nov 3 22:40:37 2004 EDT
Modified files: /phpdoc/en/reference/info/functions set-include-path.xml Log: Added second example http://cvs.php.net/diff.php/phpdoc/en/reference/info/functions/set-include-path.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/info/functions/set-include-path.xml diff -u phpdoc/en/reference/info/functions/set-include-path.xml:1.2 phpdoc/en/reference/info/functions/set-include-path.xml:1.3 --- phpdoc/en/reference/info/functions/set-include-path.xml:1.2 Mon Jun 16 15:33:51 2003 +++ phpdoc/en/reference/info/functions/set-include-path.xml Wed Nov 3 22:40:37 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.set-include-path"> <refnamediv> <refname>set_include_path</refname> @@ -35,6 +35,28 @@ </programlisting> </example> </para> + <para> + <example> + <title>Adding to the include path</title> + <para> + Making use of the <constant>PATH_SEPARATOR</constant> + constant, it is possible to extend the include path + regardless of the operating system. + </para> + <para> + In this example we add <filename>/usr/lib/pear</filename> + to the end of the existing <literal>include_path</literal>. + </para> + <programlisting role="php"> +<![CDATA[ +<?php +$path = '/usr/lib/pear'; +set_include_path(get_include_path() . PATH_SEPARATOR . $path); +?> +]]> + </programlisting> + </example> + </para> <simpara> See also <function>ini_set</function>, <function>get_include_path</function>,