mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-26 09:52:17 +01:00
126 lines
3.0 KiB
XML
126 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: c44475e1fafcbee203ed4935a6d5d7a01379fcdc Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
<refentry xml:id="function.extension-loaded" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>extension_loaded</refname>
|
|
<refpurpose>Détermine si une extension est chargée ou non</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>extension_loaded</methodname>
|
|
<methodparam><type>string</type><parameter>extension</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Détermine si une extension est chargée ou non.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>extension</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le nom de l'extension. Ce paramètre n'est pas sensible à la casse.
|
|
</para>
|
|
<para>
|
|
Vous pouvez connaître le nom des différentes extensions
|
|
PHP en utilisant la fonction <function>phpinfo</function> ou bien
|
|
si vous utilisez la version <literal>CGI</literal> ou <literal>CLI</literal>
|
|
de PHP, vous pouvez utiliser l'option de ligne de commande
|
|
<literal>-m</literal> pour afficher toutes les extensions disponibles :
|
|
<screen>
|
|
<![CDATA[
|
|
$ php -m
|
|
[PHP Modules]
|
|
xml
|
|
tokenizer
|
|
standard
|
|
sockets
|
|
session
|
|
posix
|
|
pcre
|
|
overload
|
|
mysql
|
|
mbstring
|
|
ctype
|
|
|
|
[Zend Modules]
|
|
]]>
|
|
</screen>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retourne &true; si l'extension
|
|
<parameter>extension</parameter> a été chargée, &false; sinon.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>extension_loaded</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
if (!extension_loaded('gd')) {
|
|
if (!dl('gd.so')) {
|
|
exit;
|
|
}
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>get_loaded_extensions</function></member>
|
|
<member><function>get_extension_funcs</function></member>
|
|
<member><function>phpinfo</function></member>
|
|
<member><function>dl</function></member>
|
|
<member><function>function_exists</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|