salve ragazzi secondo voi perche non riesco a definire il percorso assolut del template in smarty, e mi da un errore
Codice PHP:
$DB = new DB;
$DB->connect();
###################################################
//estraggo configurazioni #
###################################################
$configurazioni=mysql_query("SELECT titolo_help_desk,nome,email,link_helpdesk,path_helpdesk,logo,language,template ,site_enable FROM configurazioni") or die("C e stato un problem nel files di configurazione");
$siteconfig =mysql_fetch_assoc($configurazioni);
$template = $siteconfig['template'];
#####################################################
//includo il temate e la directory
#####################################################
if (file_exists('include/libs/Smarty.class.php')){
echo 'la classe esiste';
define('SMARTY_DIR', $_SERVER['DOCUMENT_ROOT'].'/supp/include/libs/');
define('TEMPLATE_SMARTY_DIR', $_SERVER['DOCUMENT_ROOT'].'/supp/template/');
define('TEMPLATE_C_SMARTY', $_SERVER['DOCUMENT_ROOT'].'/supp/include/');
define('CACHE_SMARTY', $_SERVER['DOCUMENT_ROOT'].'/supp/');
require(SMARTY_DIR . 'Smarty.class.php');
class smarty_help_desk extends Smarty {
function smarty_help_desk(){
$this->smarty();
$this-> template_dir = TEMPLATE_SMARTY_DIR.$template ;
$this-> compile_dir = TEMPLATE_C_SMARTY.'templates_c/';
$this-> cache_dir = CACHE_SMARTY.'cache/';
$this->caching = false;
}
}
$smarty = new smarty_help_desk;
}
questo e l errore
Codice PHP:
Warning: Smarty error: unable to read resource: "index.tpl" in c:\program files\easyphp1-8\www\supp\include\libs\Smarty.class.php on line 1095
Warning: Smarty error: unable to read resource: "index.tpl" in c:\program files\easyphp1-8\www\supp\include\libs\Smarty.class.php on line 1095