任何人都可以帮助我吗? 我需要在tpl页面中的document_root变量值。 我使用presta商店作为框架。有没有办法得到它?
答案 0 :(得分:3)
您需要在Prestashop挂钩中为该
指定一个smarty变量$this->context->smarty->assign('document_root', $_SERVER['DOCUMENT_ROOT'])
在你的tpl文件中使用它。
{$document_root}
答案 1 :(得分:3)
您可以使用{$smarty.const._PS_ROOT_DIR_}