|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
lazi_me Smarty n00b
Joined: 30 Apr 2003 Posts: 3
|
Posted: Wed May 07, 2003 5:03 am Post subject: Extended setup: Templates compiled to root and templates_c |
|
|
I follow Smarty extended setup. However, the templates are compiled into both d:\lang\php431\includes\templates_c\%%136 and d:\%%136 folders.
What's wrong with the setting?
I am using:
Apache: 2.0.45
PHP version: 4.3.1
Smarty version: 2.4.2
1. php.ini
include_path = ".\;d:\lang\php431\includes"
2. Smarty is in d:\lang\php431\includes\smarty
3. htdocs/album/index.php
-------------------
<?php
require 'smarty/Smarty.class.php';
require 'exconfig.php';
// Define our template directories
define('TEMPLATE_DIR', 'd:\lang\php431\includes\smarty\templates');
define('COMPILE_DIR', 'd:\lang\php431\includes\smarty\templates_c');
define('CONFIG_DIR', 'd:\lang\php431\includes\smarty\configs');
define('CACHE_DIR', 'd:\lang\php431\includes\smarty\cache');
// Create a wrapper class extended from Smarty
class Page extends Smarty
{
// $cache and $cache_lifetime are the two main variables
// that control caching within Smarty
function Page($cache = true, $cache_lifetime = 300)
{
// Run Smarty's constructor
$this->Smarty();
// Change the default template directories
$this->template_dir = TEMPLATE_DIR;
$this->compile_dir = COMPILE_DIR;
$this->config_dir = CONFIG_DIR;
$this->cache_dir = CACHE_DIR;
// Change default caching behavior
$this->caching = $cache;
$this->cache_lifetime = $cache_lifetime;
}
}
$page = new Page();
$page->assign('ExWebTitle', $ExWebTitle);
$page->assign('ExBGColor', $ExBGColor);
$page->display('exfolderview.tpl');
?> |
|
Back to top |
|
lazi_me Smarty n00b
Joined: 30 Apr 2003 Posts: 3
|
Posted: Wed May 07, 2003 5:17 am Post subject: Missing cache folder |
|
|
Nerver mind. I missed "cache" folder. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|