| 
									
										
										
										
											2004-10-07 18:50:52 +00:00
										 |  |  |  | <?xml version="1.0" encoding="iso-8859-1"?> | 
					
						
							|  |  |  |  | <!-- $Revision$ --> | 
					
						
							|  |  |  |  | <refentry id="api.config.load"> | 
					
						
							|  |  |  |  |  <refnamediv> | 
					
						
							| 
									
										
										
										
											2005-11-08 23:37:29 +00:00
										 |  |  |  |   <refname>config_load()</refname> | 
					
						
							|  |  |  |  |   <refpurpose>Carga el archivo de configuraci<63>n y lo asigna al template</refpurpose> | 
					
						
							| 
									
										
										
										
											2004-10-07 18:50:52 +00:00
										 |  |  |  |  </refnamediv> | 
					
						
							|  |  |  |  |  <refsect1> | 
					
						
							| 
									
										
										
										
											2005-11-08 23:37:29 +00:00
										 |  |  |  |   <title>Descripci<EFBFBD>n</title> | 
					
						
							| 
									
										
										
										
											2004-10-07 18:50:52 +00:00
										 |  |  |  |   <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> | 
					
						
							| 
									
										
										
										
											2005-11-08 23:37:29 +00:00
										 |  |  |  |    Esto carga el <link linkend="config.files">archivo de configuraci<63>n</link> de  | 
					
						
							| 
									
										
										
										
											2004-10-07 18:50:52 +00:00
										 |  |  |  |    datos y lo asigna al template.  Esto funciona id<69>ntico a la funci<63>n | 
					
						
							| 
									
										
										
										
											2005-11-08 23:37:29 +00:00
										 |  |  |  |    <link linkend="language.function.config.load">{config_load}</link>. | 
					
						
							| 
									
										
										
										
											2004-10-07 18:50:52 +00:00
										 |  |  |  |   </para> | 
					
						
							|  |  |  |  |   <note> | 
					
						
							|  |  |  |  |    <title>Nota T<>cnica</title> | 
					
						
							|  |  |  |  |    <para> | 
					
						
							|  |  |  |  |     A partir de Smarty 2.4.0, las variables de template asignadas son  | 
					
						
							| 
									
										
										
										
											2005-11-08 23:37:29 +00:00
										 |  |  |  |     mantenidas a trav<61>s de <link linkend="api.fetch">fetch()</link> y  | 
					
						
							|  |  |  |  |     <link linkend="api.display">display()</link>. Las variables de | 
					
						
							| 
									
										
										
										
											2004-10-07 18:50:52 +00:00
										 |  |  |  |     configuraci<63>n cargadas de config_load() son siempre de alcance global. | 
					
						
							|  |  |  |  |     Los archivos de configuracion tambi<62>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<63>n. | 
					
						
							|  |  |  |  |    </para> | 
					
						
							|  |  |  |  |   </note> | 
					
						
							|  |  |  |  |   <example> | 
					
						
							| 
									
										
										
										
											2005-11-08 23:37:29 +00:00
										 |  |  |  |    <title>config_load()</title> | 
					
						
							| 
									
										
										
										
											2004-10-07 18:50:52 +00:00
										 |  |  |  |    <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> | 
					
						
							| 
									
										
										
										
											2005-11-08 23:37:29 +00:00
										 |  |  |  |   <para> | 
					
						
							|  |  |  |  |   Ver tambi<62>n | 
					
						
							|  |  |  |  |   <link linkend="language.function.config.load">{config_load}</link>, | 
					
						
							|  |  |  |  |   <link linkend="api.get.config.vars">get_config_vars()</link>, | 
					
						
							|  |  |  |  |   <link linkend="api.clear.config">clear_config()</link>, | 
					
						
							|  |  |  |  |   y | 
					
						
							|  |  |  |  |   <link linkend="language.config.variables">config variables</link> | 
					
						
							|  |  |  |  |   </para> | 
					
						
							| 
									
										
										
										
											2004-10-07 18:50:52 +00:00
										 |  |  |  |  </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 | 
					
						
							|  |  |  |  | --> |