mfischer Sun May 5 12:55:18 2002 EDT Modified files: /phpdoc/en/reference/info/functions extension-loaded.xml dl.xml Log: - Add example. Index: phpdoc/en/reference/info/functions/extension-loaded.xml diff -u phpdoc/en/reference/info/functions/extension-loaded.xml:1.3 phpdoc/en/reference/info/functions/extension-loaded.xml:1.4 --- phpdoc/en/reference/info/functions/extension-loaded.xml:1.3 Sun May 5 12:48:17 2002 +++ phpdoc/en/reference/info/functions/extension-loaded.xml Sun May 5 12:55:17 +2002 @@ -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> @@ -17,6 +17,16 @@ 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 <literal>CGI</literal> or <literal>CLI</literal> version of @@ -54,7 +64,8 @@ </para> </note> <para> - See also <function>phpinfo</function>. + See also <function>phpinfo</function> and + <function>dl</function>. </para> </refsect1> </refentry> Index: phpdoc/en/reference/info/functions/dl.xml diff -u phpdoc/en/reference/info/functions/dl.xml:1.3 phpdoc/en/reference/info/functions/dl.xml:1.4 --- phpdoc/en/reference/info/functions/dl.xml:1.3 Sun May 5 12:47:54 2002 +++ phpdoc/en/reference/info/functions/dl.xml Sun May 5 12:55:17 2002 @@ -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> @@ -32,8 +32,22 @@ <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>