mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Added documentation for get_loaded_extensions, get_extension_functions,
get_required_files and get_included_files git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@28070 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0a0c8bbbcd
commit
7091df77eb
1 changed files with 211 additions and 0 deletions
|
@ -744,6 +744,217 @@ putenv("UNIQID=$uniqid");
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.get-loaded-extensions">
|
||||
<refnamediv>
|
||||
<refname>get_loaded_extensions</refname>
|
||||
<refpurpose>
|
||||
Returns an array with the names of all modules compiled and
|
||||
loaded
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>array <function>get_loaded_extensions</function></funcdef>
|
||||
<paramdef>void </paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This function returns the names of all the modules compiled and
|
||||
loaded in the PHP interpreter.
|
||||
</para>
|
||||
<para>
|
||||
For example the line below
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
print_r(get_loadedextensions());
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
will print a list like:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
Array
|
||||
(
|
||||
[0] => xml
|
||||
[1] => wddx
|
||||
[2] => standard
|
||||
[3] => session
|
||||
[4] => posix
|
||||
[5] => pgsql
|
||||
[6] => pcre
|
||||
[7] => gd
|
||||
[8] => ftp
|
||||
[9] => db
|
||||
[10] => Calendar
|
||||
[11] => bcmath
|
||||
)
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
See also: <function>get_extension_functions</function>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.get-extension-functions">
|
||||
<refnamediv>
|
||||
<refname>get_extension_functions</refname>
|
||||
<refpurpose>
|
||||
Returns an array with the names of the function of a module
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>array <function>get_extension_functions</function></funcdef>
|
||||
<paramdef>string <parameter>module_name</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This function returns the names of all the functions defined in the
|
||||
module indicated by <parameter>module_name</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For example the lines below
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
print_r(get_extension_funcs("xml"));
|
||||
print_r(get_extension_funcs("gd"));
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
will print a list of the functions in the modules <varname>xml</varname>
|
||||
and <varname>gd</varname> respectively.
|
||||
</para>
|
||||
<para>
|
||||
See also: <function>get_loaded_extensions</function>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.get-required-files">
|
||||
<refnamediv>
|
||||
<refname>get_required_files</refname>
|
||||
<refpurpose>
|
||||
Returns an array with the names of the files require_once()'d in a script
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>array <function>get_required_files</function></funcdef>
|
||||
<paramdef>void </paramdef>
|
||||
</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>require_once</function>. The indexes of the array are the file
|
||||
names as used in the <function>require_once</function> without the
|
||||
".php" extension.
|
||||
</para>
|
||||
<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>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.get-included-files">
|
||||
<refnamediv>
|
||||
<refname>get_included_files</refname>
|
||||
<refpurpose>
|
||||
Returns an array with the names of the files include_once()'d in a script
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>array <function>get_included_files</function></funcdef>
|
||||
<paramdef>void </paramdef>
|
||||
</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.
|
||||
</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>
|
||||
</para>
|
||||
<para>
|
||||
See also: <function>require_once</function>,
|
||||
<function>include_once</function>,
|
||||
<function>get_required_files</function>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue