Files
smarty/docs/fr/programmers/smarty-constants.xml

92 lines
2.5 KiB
XML
Raw Normal View History

2004-03-28 15:18:13 +00:00
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
2005-12-10 17:15:59 +00:00
<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready -->
2005-12-04 10:12:15 +00:00
2004-05-23 15:50:53 +00:00
<chapter id="smarty.constants">
<title>Constantes</title>
2005-05-24 22:13:50 +00:00
2004-05-23 15:50:53 +00:00
<sect1 id="constant.smarty.dir">
<title>SMARTY_DIR</title>
<para>
2005-12-04 10:12:15 +00:00
Il doit s'agir du <emphasis role="bold">chemin complet</emphasis>
du r<>pertoire o<> se trouvent les fichiers classes de Smarty.
2004-05-23 15:50:53 +00:00
S'il n'est pas d<>fini, Smarty essaiera alors d'en
d<>terminer automatiquement la valeur.
2005-12-04 10:12:15 +00:00
S'il est d<>fini, le chemin <emphasis role="bold">doit se terminer par un slash</emphasis>.
2004-05-23 15:50:53 +00:00
</para>
<example>
<title>SMARTY_DIR</title>
<programlisting role="php">
2004-03-29 10:26:13 +00:00
<![CDATA[
<?php
2005-12-10 17:15:59 +00:00
// d<>finit le chemin du r<>pertoire de Smarty sur un syst<73>me *nix
define('SMARTY_DIR', '/usr/local/lib/php/Smarty/libs/');
2005-12-04 10:12:15 +00:00
2005-12-10 17:15:59 +00:00
// d<>finit le chemin du r<>pertoire de Smarty sur un syst<73>me Windows
define('SMARTY_DIR', 'c:/webroot/libs/Smarty/libs/');
2004-03-28 15:18:13 +00:00
2005-12-04 10:12:15 +00:00
// inclut la classe Smarty. Notez le 'S' en majuscule
2005-12-10 17:15:59 +00:00
require_once(SMARTY_DIR . 'Smarty.class.php');
2004-03-29 10:26:13 +00:00
?>
2004-12-26 15:03:10 +00:00
]]>
</programlisting>
</example>
2005-05-24 22:13:50 +00:00
<para>
Voir aussi
2005-12-04 10:12:15 +00:00
<link linkend="language.variables.smarty.const">$smarty.const</link> et
<link linkend="variable.php.handling">$php_handling constants</link>.
2005-05-24 22:13:50 +00:00
</para>
2004-12-26 15:03:10 +00:00
</sect1>
<sect1 id="constant.smarty.core.dir">
<title>SMARTY_CORE_DIR</title>
<para>
Il doit s'agir du chemin complet du r<>pertoire o<>
se trouvent les fichiers internes de Smarty. S'il n'est
pas d<>fini, Smarty placera comme valeur par d<>faut la
2005-12-04 10:12:15 +00:00
valeur de la constante pr<70>c<EFBFBD>dente
2005-05-24 22:13:50 +00:00
<link linkend="constant.smarty.dir">SMARTY_DIR</link>. S'il est
2004-12-26 15:03:10 +00:00
d<>fini, le chemin doit se terminer par un slash. Utilisez cette
constante lorsque vous incluez manuellement n'importe
quel fichier core.*.
</para>
<example>
<title>SMARTY_CORE_DIR</title>
<programlisting role="php">
<![CDATA[
<?php
2005-12-04 10:12:15 +00:00
2004-12-26 15:03:10 +00:00
// chargement de core.get_microtime.php
2005-12-10 17:15:59 +00:00
require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
2004-12-26 15:03:10 +00:00
?>
2004-03-29 10:26:13 +00:00
]]>
2004-05-23 15:50:53 +00:00
</programlisting>
</example>
2005-05-24 22:13:50 +00:00
<para>
Voir aussi
<link linkend="language.variables.smarty.const">$smarty.const</link>.
</para>
2004-05-23 15:50:53 +00:00
</sect1>
2004-03-28 15:18:13 +00:00
</chapter>
2005-05-24 22:13:50 +00:00
2004-03-28 15:18:13 +00:00
<!-- 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:"../../../../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
2005-05-24 22:13:50 +00:00
-->