Smarty For Programmers-Constants

Smarty for Programmers

Chapter 11. Constants

SMARTY_DIR

This should be the full system path to the location of the Smarty class files. If this is not defined, then Smarty will attempt to determine the appropriate value automatically. If defined, the path must end with a slash.

Example 11-1. SMARTY_DIR
<?php
// set path to Smarty directory
define("SMARTY_DIR","/usr/local/lib/php/Smarty/");

require_once(
SMARTY_DIR."Smarty.class.php");
?>

SMARTY_CORE_DIR

This should be the full system path to the location of the Smarty core files. If not defined, Smarty will default this constant to the internals/ sub-directory below SMARTY_DIR. If defined, the path must end with a slash. Use this constant when manually including any of the core.* files.

Example 11-2. SMARTY_CORE_DIR <?php
// load core.get_microtime.php

require_once(SMARTY_CORE_DIR.
"core.get_microtime.php");
?>