mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-10-31 12:21:36 +01:00 
			
		
		
		
	
		
			
	
	
		
			68 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
		
		
			
		
	
	
			68 lines
		
	
	
		
			2.0 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> | |||
|  |    Carica i dati del file di configurazione <parameter>file</parameter> e | |||
|  |    li assegna al template. Funziona esattamente come la funzione del | |||
|  |    template <link linkend="language.function.config.load">config_load</link>. | |||
|  |   </para> | |||
|  |   <note> | |||
|  |    <title>Nota tecnica</title> | |||
|  |    <para> | |||
|  |     A partire da Smarty 2.4.0, le variabili dei template vengono  | |||
|  |     mantenute fra le diverse chiamate di fetch() e display(). Le  | |||
|  |     variabili di configurazione caricate con config_load() hanno  | |||
|  |     sempre uno scope globale. Anche i file di configurazione vengono | |||
|  |     compilati per una esecuzione pi<70> veloce, e rispettano le  | |||
|  |     impostazioni di <link linkend="variable.force.compile">force_compile</link> | |||
|  |     e <link linkend="variable.compile.check">compile_check</link>. | |||
|  |    </para> | |||
|  |   </note> | |||
|  |   <example> | |||
|  |    <title>config_load</title> | |||
|  |    <programlisting role="php"> | |||
|  | <![CDATA[ | |||
|  | <?php | |||
|  | // caricamento delle variabili di configurazione e loro assegnazione al template | |||
|  | $smarty->config_load('my.conf'); | |||
|  | 
 | |||
|  | // caricamento di una sezione | |||
|  | $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 | |||
|  | --> |