cvs: phpdoc /en/language/control-structures include-once.xml include.xml
| From: | Philip Olson | Date: | Sat, 27 Dec 2008 06:51:51 +0000 |
| Subject: | cvs: phpdoc /en/language/control-structures include-once.xml include.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2841@lists.php.net to get a copy of this message | ||
philip Sat Dec 27 06:51:51 2008 UTC
Modified files:
/phpdoc/en/language/control-structures include.xml include-once.xml
Log:
Whitespace
http://cvs.php.net/viewvc.cgi/phpdoc/en/language/control-structures/include.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/language/control-structures/include.xml diff -u phpdoc/en/language/control-structures/include.xml:1.1 phpdoc/en/language/control-structures/include.xml:1.2 --- phpdoc/en/language/control-structures/include.xml:1.1 Sat Dec 27 01:35:49 2008 +++ phpdoc/en/language/control-structures/include.xml Sat Dec 27 06:51:51 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <sect1 xml:id="function.include" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title><function>include</function></title> @@ -8,17 +8,17 @@ the specified file. </simpara> <simpara> - The documentation below also applies to <function>require</function>. - The two constructs are identical in every way except how they handle - failure. They both produce a - <link linkend="errorfunc.constants.errorlevels.e-warning">Warning</link>, but <function>require</function> - results in a <link linkend="errorfunc.constants.errorlevels.e-error">Fatal Error</link>. - In other words, use <function>require</function> if you want - a missing file to halt processing of the page. <function>include</function> does - not behave this way, the script will continue regardless. Be sure to have an - appropriate <link linkend="ini.include-path">include_path</link> setting as well. - Be warned that parse error in included file doesn't cause processing halting - in PHP versions prior to PHP 4.3.5. Since this version, it does. + The documentation below also applies to <function>require</function>. + The two constructs are identical in every way except how they handle + failure. They both produce a + <link linkend="errorfunc.constants.errorlevels.e-warning">Warning</link>, but <function>require</function> + results in a <link linkend="errorfunc.constants.errorlevels.e-error">Fatal Error</link>. + In other words, use <function>require</function> if you want + a missing file to halt processing of the page. <function>include</function> does + not behave this way, the script will continue regardless. Be sure to have an + appropriate <link linkend="ini.include-path">include_path</link> setting as well. + Be warned that parse error in included file doesn't cause processing halting + in PHP versions prior to PHP 4.3.5. Since this version, it does. </simpara> <simpara> Files for including are first looked for in each include_path entry @@ -33,18 +33,18 @@ is looked only in the current working directory. </simpara> <simpara> - When a file is included, the code it contains inherits the - <link linkend="language.variables.scope">variable scope</link> of the - line on which the include occurs. Any variables available at that line - in the calling file will be available within the called file, from that - point forward. - However, all functions and classes defined in the included file have the - global scope. + When a file is included, the code it contains inherits the + <link linkend="language.variables.scope">variable scope</link> of the + line on which the include occurs. Any variables available at that line + in the calling file will be available within the called file, from that + point forward. + However, all functions and classes defined in the included file have the + global scope. </simpara> <para> - <example> - <title>Basic <function>include</function> example</title> - <programlisting role="php"> + <example> + <title>Basic <function>include</function> example</title> + <programlisting role="php"> <![CDATA[ vars.php <?php @@ -65,22 +65,22 @@ ?> ]]> - </programlisting> - </example> + </programlisting> + </example> </para> <simpara> - If the include occurs inside a function within the calling file, - then all of the code contained in the called file will behave as - though it had been defined inside that function. So, it will follow - the variable scope of that function. - An exception to this rule are <link - linkend="language.constants.predefined">magic constants</link> which are - evaluated by the parser before the include occurs. + If the include occurs inside a function within the calling file, + then all of the code contained in the called file will behave as + though it had been defined inside that function. So, it will follow + the variable scope of that function. + An exception to this rule are <link + linkend="language.constants.predefined">magic constants</link> which are + evaluated by the parser before the include occurs. </simpara> <para> - <example> + <example> <title>Including within functions</title> - <programlisting role="php"> + <programlisting role="php"> <![CDATA[ <?php @@ -107,25 +107,25 @@ </example> </para> <simpara> - When a file is included, parsing drops out of PHP mode and - into HTML mode at the beginning of the target file, and resumes - again at the end. For this reason, any code inside the target - file which should be executed as PHP code must be enclosed within - <link linkend="language.basic-syntax.phpmode">valid PHP start - and end tags</link>. - </simpara> - <simpara> - If "<link linkend="ini.allow-url-fopen">URL fopen wrappers</link>" - are enabled in PHP (which they are in the default configuration), - you can specify the file to be included using a URL (via HTTP or - other supported wrapper - see <xref linkend="wrappers"/> for a list - of protocols) instead of a local pathname. If the target server interprets - the target file as PHP code, variables may be passed to the included - file using a URL request string as used with HTTP GET. This is - not strictly speaking the same thing as including the file and having - it inherit the parent file's variable scope; the script is actually - being run on the remote server and the result is then being - included into the local script. + When a file is included, parsing drops out of PHP mode and + into HTML mode at the beginning of the target file, and resumes + again at the end. For this reason, any code inside the target + file which should be executed as PHP code must be enclosed within + <link linkend="language.basic-syntax.phpmode">valid PHP start + and end tags</link>. + </simpara> + <simpara> + If "<link linkend="ini.allow-url-fopen">URL fopen wrappers</link>" + are enabled in PHP (which they are in the default configuration), + you can specify the file to be included using a URL (via HTTP or + other supported wrapper - see <xref linkend="wrappers"/> for a list + of protocols) instead of a local pathname. If the target server interprets + the target file as PHP code, variables may be passed to the included + file using a URL request string as used with HTTP GET. This is + not strictly speaking the same thing as including the file and having + it inherit the parent file's variable scope; the script is actually + being run on the remote server and the result is then being + included into the local script. </simpara> &warn.no-win32-fopen-wrapper; <para> @@ -214,7 +214,7 @@ <para> <example> <title><function>include</function> and the <function>return</function> statement</title> - <programlisting role="php"> + <programlisting role="php"> <![CDATA[ return.php <?php @@ -245,7 +245,7 @@ ?> ]]> - </programlisting> + </programlisting> </example> </para> <simpara> @@ -273,7 +273,7 @@ <para> <example> <title>Using output buffering to include a PHP file into a string</title> - <programlisting role="php"> + <programlisting role="php"> <![CDATA[ <?php $string = get_include_contents('somefile.php'); @@ -291,7 +291,7 @@ ?> ]]> - </programlisting> + </programlisting> </example> </para> <para> http://cvs.php.net/viewvc.cgi/phpdoc/en/language/control-structures/include-once.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/language/control-structures/include-once.xml diff -u phpdoc/en/language/control-structures/include-once.xml:1.1 phpdoc/en/language/control-structures/include-once.xml:1.2 --- phpdoc/en/language/control-structures/include-once.xml:1.1 Sat Dec 27 01:35:49 2008 +++ phpdoc/en/language/control-structures/include-once.xml Sat Dec 27 06:51:51 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <sect1 xml:id="function.include-once" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title><function>include_once</function></title> @@ -37,20 +37,20 @@ </para> <para> <note> - <para> - Be aware, that the behaviour of <function>include_once</function> - and <function>require_once</function> may not be what you expect - on a non case sensitive operating system (such as Windows). - <example> - <title><function>include_once</function> is case insensitive on Windows</title> - <programlisting role="php"> + <para> + Be aware, that the behaviour of <function>include_once</function> + and <function>require_once</function> may not be what you expect + on a non case sensitive operating system (such as Windows). + <example> + <title><function>include_once</function> is case insensitive on Windows</title> + <programlisting role="php"> <![CDATA[ <?php include_once "a.php"; // this will include a.php include_once "A.php"; // this will include a.php again on Windows! (PHP 4 only) ?> ]]> - </programlisting> + </programlisting> </example> This behaviour changed in PHP 5 - the path is normalized first so that <filename>C:\PROGRA~1\A.php</filename> is realized the same as @@ -58,7 +58,9 @@ </para> </note> </para> + &warn.no-win32-fopen-wrapper; + <para> See also <function>include</function>, <function>require</function>, <function>require_once</function>,
http://cvs.php.net/viewvc.cgi/phpdoc/en/language/control-structures/include.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/language/control-structures/include.xml diff -u phpdoc/en/language/control-structures/include.xml:1.1 phpdoc/en/language/control-structures/include.xml:1.2 --- phpdoc/en/language/control-structures/include.xml:1.1 Sat Dec 27 01:35:49 2008 +++ phpdoc/en/language/control-structures/include.xml Sat Dec 27 06:51:51 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <sect1 xml:id="function.include" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title><function>include</function></title> @@ -8,17 +8,17 @@ the specified file. </simpara> <simpara> - The documentation below also applies to <function>require</function>. - The two constructs are identical in every way except how they handle - failure. They both produce a - <link linkend="errorfunc.constants.errorlevels.e-warning">Warning</link>, but <function>require</function> - results in a <link linkend="errorfunc.constants.errorlevels.e-error">Fatal Error</link>. - In other words, use <function>require</function> if you want - a missing file to halt processing of the page. <function>include</function> does - not behave this way, the script will continue regardless. Be sure to have an - appropriate <link linkend="ini.include-path">include_path</link> setting as well. - Be warned that parse error in included file doesn't cause processing halting - in PHP versions prior to PHP 4.3.5. Since this version, it does. + The documentation below also applies to <function>require</function>. + The two constructs are identical in every way except how they handle + failure. They both produce a + <link linkend="errorfunc.constants.errorlevels.e-warning">Warning</link>, but <function>require</function> + results in a <link linkend="errorfunc.constants.errorlevels.e-error">Fatal Error</link>. + In other words, use <function>require</function> if you want + a missing file to halt processing of the page. <function>include</function> does + not behave this way, the script will continue regardless. Be sure to have an + appropriate <link linkend="ini.include-path">include_path</link> setting as well. + Be warned that parse error in included file doesn't cause processing halting + in PHP versions prior to PHP 4.3.5. Since this version, it does. </simpara> <simpara> Files for including are first looked for in each include_path entry @@ -33,18 +33,18 @@ is looked only in the current working directory. </simpara> <simpara> - When a file is included, the code it contains inherits the - <link linkend="language.variables.scope">variable scope</link> of the - line on which the include occurs. Any variables available at that line - in the calling file will be available within the called file, from that - point forward. - However, all functions and classes defined in the included file have the - global scope. + When a file is included, the code it contains inherits the + <link linkend="language.variables.scope">variable scope</link> of the + line on which the include occurs. Any variables available at that line + in the calling file will be available within the called file, from that + point forward. + However, all functions and classes defined in the included file have the + global scope. </simpara> <para> - <example> - <title>Basic <function>include</function> example</title> - <programlisting role="php"> + <example> + <title>Basic <function>include</function> example</title> + <programlisting role="php"> <![CDATA[ vars.php <?php @@ -65,22 +65,22 @@ ?> ]]> - </programlisting> - </example> + </programlisting> + </example> </para> <simpara> - If the include occurs inside a function within the calling file, - then all of the code contained in the called file will behave as - though it had been defined inside that function. So, it will follow - the variable scope of that function. - An exception to this rule are <link - linkend="language.constants.predefined">magic constants</link> which are - evaluated by the parser before the include occurs. + If the include occurs inside a function within the calling file, + then all of the code contained in the called file will behave as + though it had been defined inside that function. So, it will follow + the variable scope of that function. + An exception to this rule are <link + linkend="language.constants.predefined">magic constants</link> which are + evaluated by the parser before the include occurs. </simpara> <para> - <example> + <example> <title>Including within functions</title> - <programlisting role="php"> + <programlisting role="php"> <![CDATA[ <?php @@ -107,25 +107,25 @@ </example> </para> <simpara> - When a file is included, parsing drops out of PHP mode and - into HTML mode at the beginning of the target file, and resumes - again at the end. For this reason, any code inside the target - file which should be executed as PHP code must be enclosed within - <link linkend="language.basic-syntax.phpmode">valid PHP start - and end tags</link>. - </simpara> - <simpara> - If "<link linkend="ini.allow-url-fopen">URL fopen wrappers</link>" - are enabled in PHP (which they are in the default configuration), - you can specify the file to be included using a URL (via HTTP or - other supported wrapper - see <xref linkend="wrappers"/> for a list - of protocols) instead of a local pathname. If the target server interprets - the target file as PHP code, variables may be passed to the included - file using a URL request string as used with HTTP GET. This is - not strictly speaking the same thing as including the file and having - it inherit the parent file's variable scope; the script is actually - being run on the remote server and the result is then being - included into the local script. + When a file is included, parsing drops out of PHP mode and + into HTML mode at the beginning of the target file, and resumes + again at the end. For this reason, any code inside the target + file which should be executed as PHP code must be enclosed within + <link linkend="language.basic-syntax.phpmode">valid PHP start + and end tags</link>. + </simpara> + <simpara> + If "<link linkend="ini.allow-url-fopen">URL fopen wrappers</link>" + are enabled in PHP (which they are in the default configuration), + you can specify the file to be included using a URL (via HTTP or + other supported wrapper - see <xref linkend="wrappers"/> for a list + of protocols) instead of a local pathname. If the target server interprets + the target file as PHP code, variables may be passed to the included + file using a URL request string as used with HTTP GET. This is + not strictly speaking the same thing as including the file and having + it inherit the parent file's variable scope; the script is actually + being run on the remote server and the result is then being + included into the local script. </simpara> &warn.no-win32-fopen-wrapper; <para> @@ -214,7 +214,7 @@ <para> <example> <title><function>include</function> and the <function>return</function> statement</title> - <programlisting role="php"> + <programlisting role="php"> <![CDATA[ return.php <?php @@ -245,7 +245,7 @@ ?> ]]> - </programlisting> + </programlisting> </example> </para> <simpara> @@ -273,7 +273,7 @@ <para> <example> <title>Using output buffering to include a PHP file into a string</title> - <programlisting role="php"> + <programlisting role="php"> <![CDATA[ <?php $string = get_include_contents('somefile.php'); @@ -291,7 +291,7 @@ ?> ]]> - </programlisting> + </programlisting> </example> </para> <para> http://cvs.php.net/viewvc.cgi/phpdoc/en/language/control-structures/include-once.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/language/control-structures/include-once.xml diff -u phpdoc/en/language/control-structures/include-once.xml:1.1 phpdoc/en/language/control-structures/include-once.xml:1.2 --- phpdoc/en/language/control-structures/include-once.xml:1.1 Sat Dec 27 01:35:49 2008 +++ phpdoc/en/language/control-structures/include-once.xml Sat Dec 27 06:51:51 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <sect1 xml:id="function.include-once" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title><function>include_once</function></title> @@ -37,20 +37,20 @@ </para> <para> <note> - <para> - Be aware, that the behaviour of <function>include_once</function> - and <function>require_once</function> may not be what you expect - on a non case sensitive operating system (such as Windows). - <example> - <title><function>include_once</function> is case insensitive on Windows</title> - <programlisting role="php"> + <para> + Be aware, that the behaviour of <function>include_once</function> + and <function>require_once</function> may not be what you expect + on a non case sensitive operating system (such as Windows). + <example> + <title><function>include_once</function> is case insensitive on Windows</title> + <programlisting role="php"> <![CDATA[ <?php include_once "a.php"; // this will include a.php include_once "A.php"; // this will include a.php again on Windows! (PHP 4 only) ?> ]]> - </programlisting> + </programlisting> </example> This behaviour changed in PHP 5 - the path is normalized first so that <filename>C:\PROGRA~1\A.php</filename> is realized the same as @@ -58,7 +58,9 @@ </para> </note> </para> + &warn.no-win32-fopen-wrapper; + <para> See also <function>include</function>, <function>require</function>, <function>require_once</function>,