updated docs for get_required_files/get_included_files to reflect the

changes in PHP 4.0.4


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@43743 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jesus M. Castagnetto 2001-03-17 07:13:33 +00:00
parent 76827a16de
commit 652d0df057

View file

@ -1103,8 +1103,8 @@ print_r (get_extension_funcs ("gd"));
<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,63 +1116,23 @@ print_r (get_extension_funcs (&quot;gd&quot;));
</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 &quot;.php&quot; extension.
</para>
<para>
The example below
<example>
<title>Printing the required and included files</title>
<programlisting>
&lt;?php
require_once (&quot;local.php&quot;);
require_once (&quot;../inc/global.php&quot;);
for ($i=1; $i&lt;5; $i++)
include &quot;util&quot;.$i.&quot;php&quot;;
echo &quot;Required_once files\n&quot;;
print_r (get_required_files());
echo &quot;Included_once files\n&quot;;
print_r (get_included_files());
?&gt;
</programlisting>
</example>
will generate the following output:
<informalexample>
<programlisting>
Required_once files
Array
(
[local] =&gt; local.php
[../inc/global] =&gt; /full/path/to/inc/global.php
)
Included_once files
Array
(
[util1] =&gt; util1.php
[util2] =&gt; util2.php
[util3] =&gt; util3.php
[util4] =&gt; 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
&quot;.php&quot;, other extensions do not work.
</para>
</note>
<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
&quot;.php&quot;, 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>
See also: <function>require_once</function>,
<function>include_once</function>,
@ -1198,21 +1158,53 @@ Array
</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 &quot;.php&quot; 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
&quot;.php&quot;, other extensions do not work.
</para>
</note>
The example below
<example>
<title>Printing the required and included files</title>
<programlisting>
&lt;?php
require_once (&quot;local.php&quot;);
require_once (&quot;../inc/global.php&quot;);
for ($i=1; $i&lt;5; $i++)
include &quot;util&quot;.$i.&quot;php&quot;;
echo &quot;Required_once/Included_once files\n&quot;;
print_r (get_required_files());
</programlisting>
</example>
will generate the following output:
<informalexample>
<programlisting>
Required_once/Included_once files
Array
(
[0] =&gt; local.php
[1] =&gt; /full/path/to/inc/global.php
[2] =&gt; util1.php
[3] =&gt; util2.php
[4] =&gt; util3.php
[5] =&gt; 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
&quot;.php&quot;, 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>,