У меня возникли проблемы с Smarty «выборка» .Its не загружающий content.I бы проверить найденный где я нашелSmarty выборки не работают
$subject = $smarty->fetch("emailtpl:emailsubject");
$message = $smarty->fetch("emailtpl:emailmessage");
Когда я пытаюсь напечатать $ предмет и $ переменные сообщения, они пустые. Я пытаюсь понять проблему. Пожалуйста помоги. Код: -
#$subject :- This variable has value like "forgot password"
#$message :- This variable has value like email content
include_once(ROOTDIR . "/includes/smarty/Smarty.class.php");
$smarty = new Smarty();
$smarty->caching = 0;
$smarty->compile_dir = ROOTDIR . "/" . $templatecompilerpath;
$smarty->compile_id = md5($subject . $message);
$smarty->register_resource("emailtpl", array("emailtpl_template", "emailtpl_timestamp", "emailtpl_secure", "emailtpl_trusted"));
$smarty->assign("emailsubject", $subject);
$smarty->assign("emailmessage", $message);
#It assigns value
$smarty->assign("enc", $enc); //enc is vaiable having vluae defined
Then it takes the value as
$subject = $smarty->fetch("emailtpl:emailsubject");
$message = $smarty->fetch("emailtpl:emailmessage");
Но когда я печатаю переменные $ subject и $ message. Они пусты. Я не понял, как работает этот код и где определяется адрес электронной почты.
Как отладить его. Пожалуйста, помогите
Этот код создает динамический шаблон? – shail