| 
									
										
										
										
											2004-03-28 15:15:38 +00:00
										 |  |  | <?xml version="1.0" encoding="iso-8859-1"?> | 
					
						
							|  |  |  | <!-- $Revision$ --> | 
					
						
							| 
									
										
										
										
											2005-05-27 16:25:02 +00:00
										 |  |  | <chapter id="smarty.constants"> | 
					
						
							|  |  |  | <title>Constants</title> | 
					
						
							| 
									
										
										
										
											2004-03-28 15:15:38 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-05-27 16:25:02 +00:00
										 |  |  | <sect1 id="constant.smarty.dir"> | 
					
						
							|  |  |  |   <title>SMARTY_DIR</title> | 
					
						
							| 
									
										
										
										
											2004-03-28 15:15:38 +00:00
										 |  |  |     <para> | 
					
						
							| 
									
										
										
										
											2005-09-10 11:36:33 +00:00
										 |  |  |      This should be the <emphasis role="bold">full system path</emphasis> | 
					
						
							|  |  |  |      to the location of the Smarty | 
					
						
							| 
									
										
										
										
											2004-03-28 15:15:38 +00:00
										 |  |  |      class files. If this is not defined, then Smarty will attempt to | 
					
						
							|  |  |  |      determine the appropriate value automatically. If defined, the path | 
					
						
							| 
									
										
										
										
											2005-05-27 16:25:02 +00:00
										 |  |  |      <emphasis role="bold">must end with a slash</emphasis>. | 
					
						
							| 
									
										
										
										
											2004-03-28 15:15:38 +00:00
										 |  |  |     </para> | 
					
						
							|  |  |  |     <example> | 
					
						
							|  |  |  |      <title>SMARTY_DIR</title> | 
					
						
							|  |  |  |      <programlisting role="php"> | 
					
						
							|  |  |  | <![CDATA[ | 
					
						
							|  |  |  | <?php | 
					
						
							| 
									
										
										
										
											2005-05-27 16:25:02 +00:00
										 |  |  | // set path to Smarty directory *nix style | 
					
						
							| 
									
										
										
										
											2005-12-09 18:46:25 +00:00
										 |  |  | define('SMARTY_DIR', '/usr/local/lib/php/Smarty/libs/'); | 
					
						
							| 
									
										
										
										
											2004-03-28 15:15:38 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-05-27 16:25:02 +00:00
										 |  |  | // path to Smarty windows style | 
					
						
							| 
									
										
										
										
											2005-12-09 18:46:25 +00:00
										 |  |  | define('SMARTY_DIR', 'c:/webroot/libs/Smarty/libs/'); | 
					
						
							| 
									
										
										
										
											2005-05-27 16:25:02 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | // include the smarty class Note 'S' is upper case | 
					
						
							| 
									
										
										
										
											2005-12-09 18:46:25 +00:00
										 |  |  | require_once(SMARTY_DIR . 'Smarty.class.php'); | 
					
						
							| 
									
										
										
										
											2004-03-28 15:15:38 +00:00
										 |  |  | ?> | 
					
						
							| 
									
										
										
										
											2004-09-17 00:33:24 +00:00
										 |  |  | ]]> | 
					
						
							|  |  |  |      </programlisting> | 
					
						
							|  |  |  |     </example> | 
					
						
							| 
									
										
										
										
											2005-05-27 16:25:02 +00:00
										 |  |  |   <para> | 
					
						
							|  |  |  |   See also | 
					
						
							|  |  |  |   <link linkend="language.variables.smarty.const">$smarty.const</link> | 
					
						
							|  |  |  |   and | 
					
						
							|  |  |  |   <link | 
					
						
							|  |  |  |   linkend="variable.php.handling">$php_handling constants</link> | 
					
						
							|  |  |  |   </para> | 
					
						
							|  |  |  | </sect1> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <sect1 id="constant.smarty.core.dir"> | 
					
						
							| 
									
										
										
										
											2004-09-17 00:33:24 +00:00
										 |  |  |     <title>SMARTY_CORE_DIR</title> | 
					
						
							|  |  |  |     <para> | 
					
						
							|  |  |  |      This should be the full system path to the location of the Smarty core | 
					
						
							| 
									
										
										
										
											2005-05-27 16:25:02 +00:00
										 |  |  |      files. If not defined, Smarty will default this constant to the | 
					
						
							| 
									
										
										
										
											2005-12-09 18:46:25 +00:00
										 |  |  |      <emphasis>internals/</emphasis> | 
					
						
							| 
									
										
										
										
											2005-05-23 15:43:01 +00:00
										 |  |  |      sub-directory below | 
					
						
							|  |  |  |      <link linkend="constant.smarty.dir">SMARTY_DIR</link>. | 
					
						
							|  |  |  |      If defined, the path must end with a slash. | 
					
						
							| 
									
										
										
										
											2004-09-17 00:33:24 +00:00
										 |  |  |      Use this constant when manually including any of the core.* files. | 
					
						
							|  |  |  |     </para> | 
					
						
							|  |  |  |     <example> | 
					
						
							|  |  |  |      <title>SMARTY_CORE_DIR</title> | 
					
						
							|  |  |  |      <programlisting role="php"> | 
					
						
							|  |  |  | <![CDATA[ | 
					
						
							|  |  |  | <?php | 
					
						
							| 
									
										
										
										
											2005-05-27 16:25:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2004-09-17 00:33:24 +00:00
										 |  |  | // load core.get_microtime.php | 
					
						
							| 
									
										
										
										
											2005-12-09 18:46:25 +00:00
										 |  |  | require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); | 
					
						
							| 
									
										
										
										
											2004-09-17 00:33:24 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | ?> | 
					
						
							| 
									
										
										
										
											2004-03-28 15:15:38 +00:00
										 |  |  | ]]> | 
					
						
							|  |  |  |      </programlisting> | 
					
						
							|  |  |  |     </example> | 
					
						
							| 
									
										
										
										
											2005-05-23 15:43:01 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     <para> | 
					
						
							|  |  |  |     See also | 
					
						
							|  |  |  |     <link linkend="language.variables.smarty.const">$smarty.const</link> | 
					
						
							|  |  |  |     </para> | 
					
						
							| 
									
										
										
										
											2004-03-28 15:15:38 +00:00
										 |  |  |    </sect1> | 
					
						
							|  |  |  | </chapter> | 
					
						
							|  |  |  | <!-- 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 | 
					
						
							| 
									
										
										
										
											2004-04-13 11:47:32 +00:00
										 |  |  | --> |