mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-23 01:11:36 +02:00
69 lines
1.9 KiB
XML
69 lines
1.9 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision$ -->
|
|
<refentry id="api.config.load">
|
|
<refnamediv>
|
|
<refname>config_load</refname>
|
|
<refpurpose></refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title />
|
|
<methodsynopsis>
|
|
<type>void</type><methodname>config_load</methodname>
|
|
<methodparam><type>string</type><parameter>file</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>section</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Esto carga el <parameter>archivo</parameter> de configuración de
|
|
datos y lo asigna al template. Esto funciona idéntico a la función
|
|
<link linkend="language.function.config.load">config_load</link>.
|
|
</para>
|
|
<note>
|
|
<title>Nota Técnica</title>
|
|
<para>
|
|
A partir de Smarty 2.4.0, las variables de template asignadas son
|
|
mantenidas a través de fetch() y display(). Las variables de
|
|
configuración cargadas de config_load() son siempre de alcance global.
|
|
Los archivos de configuracion también son compilados para
|
|
execución rapida, y respetar el
|
|
<link linkend="variable.force.compile">force_compile</link> y
|
|
<link linkend="variable.compile.check">compile_check</link> de
|
|
configuración.
|
|
</para>
|
|
</note>
|
|
<example>
|
|
<title>config_load</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// load config variables and assign them
|
|
$smarty->config_load('my.conf');
|
|
|
|
// load a section
|
|
$smarty->config_load('my.conf', 'foobar');
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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:"../../../../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
|
|
-->
|