jmcastagnetto Fri Mar 16 23:13:33 2001 EDT
Modified files:
/phpdoc/en/functions info.xml
Log:
updated docs for get_required_files/get_included_files to reflect the
changes in PHP 4.0.4
Index: phpdoc/en/functions/info.xml
diff -u phpdoc/en/functions/info.xml:1.40 phpdoc/en/functions/info.xml:1.41
--- phpdoc/en/functions/info.xml:1.40 Fri Mar 9 07:33:03 2001
+++ phpdoc/en/functions/info.xml Fri Mar 16 23:13:33 2001
@@ -1103,8 +1103,8 @@
<refnamediv>
<refname>get_required_files</refname>
<refpurpose>
- Returns an array with the names of the files require_once()'d in
- a script
+ Returns an array with the names of the files require_once()'d or
+ included_once()'d in a script
</refpurpose>
</refnamediv>
<refsect1>
@@ -1116,64 +1116,24 @@
</funcprototype>
</funcsynopsis>
<para>
- This function returns an associtative array of the names of all
+ This function returns an array of the names of all
the files that have been loaded into a script using
- <function>require_once</function>. The indexes of the array are
- the file names as used in the <function>require_once</function>
- without the ".php" extension.
+ <function>require_once</function> or <function>include_once</function>.
</para>
+ <note>
+ <para>
+ In PHP 4.0.1pl2 this function assumed that the
+ <varname>required_once</varname> files end in the extension
+ ".php", other extensions do not work. Also, in that
+ version the array returned was an associative array, and this
+ function was not an alias for <function>get_included_files</function>
+ </para>
+ <para>
+ As of PHP 4.0.4, this function is an alias for
+ <function>get_included_files</function>
+ </para>
+ </note>
<para>
- The example below
- <example>
- <title>Printing the required and included files</title>
- <programlisting>
-<?php
-
-require_once ("local.php");
-require_once ("../inc/global.php");
-
-for ($i=1; $i<5; $i++)
- include "util".$i."php";
-
- echo "Required_once files\n";
- print_r (get_required_files());
-
- echo "Included_once files\n";
- print_r (get_included_files());
-?>
- </programlisting>
- </example>
- will generate the following output:
- <informalexample>
- <programlisting>
-Required_once files
-Array
-(
- [local] => local.php
- [../inc/global] => /full/path/to/inc/global.php
-)
-
-Included_once files
-Array
-(
- [util1] => util1.php
- [util2] => util2.php
- [util3] => util3.php
- [util4] => util4.php
-)
- </programlisting>
- </informalexample>
- </para>
- <para>
- <note>
- <para>
- As of PHP 4.0.1pl2 this function assumes that the
- <varname>required_once</varname> files end in the extension
- ".php", other extensions do not work.
- </para>
- </note>
- </para>
- <para>
See also: <function>require_once</function>,
<function>include_once</function>,
<function>get_included_files</function>
@@ -1198,21 +1158,53 @@
</funcprototype>
</funcsynopsis>
<para>
- This function returns an associtative array of the names of all
- the files that have been loaded into a script using
- <function>include_once</function>. The indexes of the array are
- the file names as used in the <function>include_once</function>
- without the ".php" extension.
+ This function returns an array of the names of all
+ the files that have been loaded into a script using
+ <function>require_once</function> or
+ <function>include_once</function>.
</para>
<para>
- <note>
- <para>
- As of PHP 4.0.1pl2 this function assumes that the
- <varname>include_once</varname> files end in the extension
- ".php", other extensions do not work.
- </para>
- </note>
+ The example below
+ <example>
+ <title>Printing the required and included files</title>
+ <programlisting>
+<?php
+
+require_once ("local.php");
+require_once ("../inc/global.php");
+
+for ($i=1; $i<5; $i++)
+ include "util".$i."php";
+
+ echo "Required_once/Included_once files\n";
+ print_r (get_required_files());
+ </programlisting>
+ </example>
+ will generate the following output:
+ <informalexample>
+ <programlisting>
+Required_once/Included_once files
+Array
+(
+ [0] => local.php
+ [1] => /full/path/to/inc/global.php
+ [2] => util1.php
+ [3] => util2.php
+ [4] => util3.php
+ [5] => util4.php
+)
+ </programlisting>
+ </informalexample>
</para>
+ <note>
+ <para>
+ In PHP 4.0.1pl2 this function assumed that the
+ <varname>include_once</varname> files end in the extension
+ ".php", other extensions do not work. Also, in that
+ version the array returned was an associative array, and
+ listed only the included files.
+ </para>
+ </note>
<para>
See also: <function>require_once</function>,
<function>include_once</function>,