Get Smarty

Donate

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Buy cheap glasses from Cheapglasses123.com and save up to 80%.

Where to buy prescription glasses? EyewearCanada.com is your best choice!

Advertisement

Chapter 12. 常量

Table of Contents

SMARTY_DIR

SMARTY_DIR

这是Smarty类文件的系统路径。 如果在你的程序中没有明确定义,则Smarty将自动获取适当的路径。 如果定义了该路径,那么路径必须以斜杠/结尾.

Example 12.1. SMARTY_DIR


<?php
// 用 *nix 方式定义Smarty的路径
define('SMARTY_DIR', '/usr/local/lib/php/Smarty-v.e.r/libs/');

// 用 windows 方式定义Smarty的路径
define('SMARTY_DIR', 'c:/webroot/libs/Smarty-v.e.r/libs/');

// 包含Smarty类,注意'S'是大写的。
require_once(SMARTY_DIR . 'Smarty.class.php');
?>

     

参考 $smarty.const$php_handling constants

Comments
No comments for this page.

Advertisement