- Add example.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@81290 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Markus Fischer 2002-05-05 16:55:17 +00:00
parent 7590b3dabe
commit e3e8c188c9
2 changed files with 30 additions and 9 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/info.xml, last change in rev 1.29 -->
<refentry id="function.dl">
<refnamediv>
@ -31,9 +31,23 @@
specified library couldn't be loaded, in addition to &false; an
<constant>E_WARNING</constant> message is emitted.
</para>
<para>
Use <function>extension_loaded</function> to test whether a given
extension is already available or not.
</para>
<para>
Example:
<programlisting role="php">
if (!extension_loaded('gd')) {
if (!dl('gd.so')) {
exit;
}
}
</programlisting>
</para>
<para>
The directory where the extension is loaded from depends on your
platform, too:
platform:
</para>
<para>
Windows - If not explicitly set in the <literal>PHP.INI</literal>,
@ -82,13 +96,9 @@
</note>
<note>
<para>
<function>dl</function> is case sensitive on unix platforms.
<function>dl</function> is case sensitive on unix platforms.
</para>
</note>
<para>
Use <function>extension_loaded</function> to test whether a given
extension is already available or not.
</para>
<para>
See also
<link linkend="ini.sect.extension">Extension Loading Directives</link>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/info.xml, last change in rev 1.2 -->
<refentry id="function.extension-loaded">
<refnamediv>
@ -16,6 +16,16 @@
Returns &true; if the extension identified by <parameter>name</parameter>
is loaded, &false; otherwise.
</para>
<para>
Example:
<programlisting role="php">
if (!extension_loaded('gd')) {
if (!dl('gd.so')) {
exit;
}
}
</programlisting>
</para>
<para>
You can see the names of various extensions by using
<function>phpinfo</function> or if you're usnig the
@ -54,7 +64,8 @@ ctype
</para>
</note>
<para>
See also <function>phpinfo</function>.
See also <function>phpinfo</function> and
<function>dl</function>.
</para>
</refsect1>
</refentry>