// load Smarty library
require('Smarty.class.php');
// The setup.php file is a good place to load
// required application library files, and you
// can do that right here. An example:
// require('guestbook/guestbook.lib.php');是一個很好的加載應用程序的類庫文件(就是擴展類)
//例如你可以在index文件裡包含它
class Smarty_GuestBook extends Smarty {
function Smarty_GuestBook() {
// Class Constructor. These automatically get set with each new instance.
//類構造函數.創建實例的時候自動配置
$this->Smarty();
$this->template_dir = '/web/www.mydomain.com/smarty/guestbook/templates/';
$this->compile_dir = '/web/www.mydomain.com/smarty/guestbook/templates_c/';
$this->config_dir = '/web/www.mydomain.com/smarty/guestbook/configs/';
$this->cache_dir = '/web/www.mydomain.com/smarty/guestbook/cache/';
$this->caching = true;
$this->assign('app_name','Guest Book');
}
}