首页 文章
  • -1 votes
     answers
     views

    Smarty PHP / TPL循环

    下拉列表,当一个编辑页面来我需要从另一个mysql表中选择值但已经在文件上使用循环时,我怎样才能比较两个循环再次在表格上循环两次的文件到TPL Smarty
  • 1 votes
     answers
     views

    刷新后保留选定的选项(表单/选择)[重复]

    可能重复:提交后Html选择选项丢失数据 我有一个选择菜单,应该在页面刷新后保留选定的选项 . 这是一个例子: <select id="form_frame" name="frame" onchange="getData(this);"/> <option value="data1" sel...
  • 0 votes
     answers
     views

    PHP致命错误:require()

    我有一个网站,在我的本地主机上使用xampp完美,但是...我上传到几个免费网站托管(000webhost和hostinger),当我尝试打开它时,收到此消息: 警告:require(core / libs / smarty / Smarty.class.php):无法打开流:第7行/home/u327900732/public_html/www/index.php中没有此类文件或目录致命错误:...
  • 0 votes
     answers
     views

    用户登录时关闭Prestashop产品折扣[关闭]

    我正在使用prestashop 1.6.1.0 ... 这里的数学不是很累,还是我误解了什么? 我的产品价格为413.60美元 - 基本价格 . 我给了138.60美元的折扣金额 所以最终产品应该花费275美元 对于没有税收规则的产品来说这很好......我已经为加利福尼亚州制定了税收规则... 8.25%...所以当我以加利福尼亚地址作为客户登录时...这些是我在产品页面上看到的数字 原价:41...
  • 0 votes
     answers
     views

    使用智能模板显示尺寸图像

    我正在使用 smarty 模板动态渲染页面;这就是我在 php 文件中分配变量的方式:$imgsrc1,$imgsrc2,$imgsrc3 包含上传图像文件的位置 $smarty->assign('foto1', $imgsrc1); $smarty->assign('foto2', $imgsrc2); $smarty->assign('foto3', $imgsrc3); ...
  • 0 votes
     answers
     views

    如何将php smarty下拉列表转换为按钮?

    我需要帮助将php smarty下拉到按钮 . 我正在尝试为订阅和取消订阅时事通讯创建两个按钮 . 请帮助 . Php smarty code: private function isNewsletterRegistered($customerEmail) { if (Db::getInstance()->getRow('SELECT `email` FROM '._DB_PREFI...
  • 0 votes
     answers
     views

    将php文件数据显示到.tpl(Smarty)

    我有 demo.php 文件,在那里我创建了一个从数据库中获取数据的函数: 例如: function display() { $sql = "SELECT * FROM user WHERE id=" . $_POST['id']; $r=mysql_query($sql); $row=mysql_fetch_row($r); } 现在,我有 user...
  • 4 votes
     answers
     views

    什么是在PHP中缓存文件的最佳方法?

    我正在使用Smarty和我的PHP代码,我喜欢缓存一些网站页面,所以我使用以下代码: // TOP of script ob_start(); // start the output buffer $cachefile ="cache/cachefile.html"; // normal PHP script $smarty->display('somefile.t...
  • 3 votes
     answers
     views

    将Search.php查询中的值输出到Prestashop中的product-list.tpl

    我需要在product-list.tpl文件中输出Prestashop中classes / Search.php中查询的结果 . classes / Search.php中的查询是: $sql = 'SELECT * FROM `'._DB_PREFIX_.'category_group` cg INNER JOIN `'._DB_...
  • 0 votes
     answers
     views

    Smarty包含动态内容的tpl?

    我有一点聪明的问题,但不知道如何解决这个问题 . 这是我的index.tpl <body> {include file='header.tpl'} {include file='leftmenu.tpl'} <div id=content> {include file="news.tpl" } {include f...
  • 1 votes
     answers
     views

    使用php或javascript过滤结果

    我是使用MySQL开发PHP,Smarty的新手 . 我想就以下方面提出专家意见,或者任何好的建议都会做 . 所以我做了一个index.php连接到数据库(MySQL)也是Smarty,通过查询读取我的数据并从我的index.tpl文件中显示它们 . 对于我的产品,product.php连接到数据库,进行查询,并在product.tpl页面上显示我的产品 . 对于我的index.php,我想添加一...
  • 2 votes
     answers
     views

    prestashop 1.7如何在后台编辑“添加产品”页面

    我正在尝试没有任何成功,编辑主题中的页面,因为我在产品表中添加了7个我想在后台管理的字段 . 我已经看到Prestoshop的1.6版本具有该页面的特定视图,并且向表单添加字段非常简单 . 至于1.7我真的很疯狂,因为我找不到管理“添加产品”页面的任何视图 . 任何提示?我知道它可能与Prestashop中引入Symfony有关,但我不明白 . 谢谢 EDIT 解决方法在此处很好的答案:https...
  • 2 votes
     answers
     views

    使用smarty编译product.tpl时出错

    我试图使用smarty编译this tpl文件 . 我的php文件是this . 但我正在显示错误消息 (!)致命错误:未捕获 - > Smarty编译器:第94行模板“ . \ templates \ product.tpl”中的语法错误“var doesntExist ='“;”未知标签“l”< - 在第94行的C:\ wamp \ www \ Smarty \ libs \ s...
  • 0 votes
     answers
     views

    如何修复erorr“致命错误:未捕获 - > Smarty:无法写入文件”?

    我使用digitalocean将Prestashop从localhost迁移到网站域,但是当我打开这个网站时,我收到了这个错误 致命错误:未捕获 - > Smarty:无法写入文件/ var / www / html / prestashop / cache / smarty / compile / a4 / 36 / f1 / wrt549a35e49b3b44_77591243 &lt...
  • -3 votes
     answers
     views

    我的文件不易读

    我正在尝试将PHP文件包含到tpl文件中我的代码: /**{include_php file='Compteur.php'}**/ Smarty sh 注意:未定义的属性:SmaleyBC :: $ trusted_dir位于/ 730/行的/var/www/vhosts/vps143526.ovh.net/my-wall.fr/dev/tools/smarty/Smarty.class.ph...
  • 0 votes
     answers
     views

    Prestashop后台模块 - 查看/ Smarty / Uncaught异常SmartyException

    我正在努力实现Prestashop后台模块 . 我在安装文件中添加了新的Tab 我在视图的显示上有错误消息 . 我的实现中可能缺少一些东西 . 模块名称为:mydashboard 我将tpl文件放在文件夹/ web / modules / mydashboard / views / templates / admin / mydashboard中 错误消息是 / var / www / clien...
  • 1 votes
     answers
     views

    Prestashop后端和前端模块在某些页面上显示错误

    在前端的某些页面上的PrestaShop 1.6上我收到以下错误和管理员的所有页面当我尝试登录时我收到此错误 致命错误:未捕获 - > Smarty:'/modules/blockbestsellers/views/templates/hook/tab.tpl'的编译模板无效< - 在第182行的/tools/smarty/sysplugins/smarty_internal_tem...
  • 0 votes
     answers
     views

    未捕获SmartyCompilerException:语法服务器迁移模板中的错误

    我正在将Prestashop服务器转移到另一台服务器 . 原始服务器是带有Apache的CentOS,目标是带有Nginx的Ubuntu . 问题是当我在Prestashop中打开产品链接时出现此错误: 致命错误:未捕获SmartyCompilerException:第48行“{/ addJsDefL} {/ strip} {/ if}”模板“/var/www/loja/themes/defau...
  • -1 votes
     answers
     views

    如何修复Prestashop致命错误:未捕获 - > Smarty编译器?

    致命错误:未捕获 - > Smarty编译器:模板中的语法错误“/home/sites/riversoft.com.mk/public_html/admin397ebpwvj/themes/default/template/header.tpl”第256行“headers:{”缓存-control“:”no-cache“},” - 意外“:”,预期之一:“}”< - 抛出/home/...
  • 0 votes
     answers
     views

    致命错误:未捕获 - > Smarty:无法写入文件

    我正在尝试将我的cs-cart多供应商4.3.8站点迁移到新服务器 . 我必须导入数据库并更新config.local.php文件 . 但是,当我在新服务器中访问我的网站时,我收到此错误 致命错误:未捕获 - > Smarty:无法写入文件/ var / www / html / var / cache / templates / responsive / wrt591a6df1c1b49...
  • 1 votes
     answers
     views

    在Symfony2中,如何直接在智能模板中呈现控制器?

    我是Symfony的新手,到目前为止一切正常,除了以下:我安装SmartyBundle使用Smarty模板引擎而不是默认的Twig . 它运作良好 . 但是在第79页的the Symfony book中,他们解释了一个非常简洁的Twig函数:直接从模板中嵌入控制器结果的能力 . 我没有设法与Smarty合作,所以你知道是否可以做到这一点,以及如何做到这一点? 我想我可以使用forward方法从我当...
  • 0 votes
     answers
     views

    jQuery .each与.tpl中的Smarty变量

    我有一个页面,其中包含以下html,其中包含不同的电话号码: <div class="crm-content crm-contact_phone primary"> <span>5555551212</span> </div> 电话号码本身使用{$ phone.i.phone}形式的smarty变量显示,其中i是电话号码...
  • 0 votes
     answers
     views

    Resurive函数调用用户在smarty插件目录中创建的smarty函数

    我想在smarty插件目录中编写一个smarty函数 . 它是一个递归函数 . 它在普通的php文件中运行良好,并会生成一个下拉选择框 . 现在我想使它成为一个聪明的功能,并希望从tpl调用它 . <?php /* * Smarty plugin * ————————————————————- * File: funct...
  • 1 votes
     answers
     views

    在smarty模板中替换php file_get_contents?

    我需要在smarty tpl文件中使用PHP file_get_contents() . 我可以't use it in PHP and assign it to smarty template. Because the URL is generated dynamically through loop inside smarty template file. So I' m使用smarty插...
  • 0 votes
     answers
     views

    选项位于Smarty的下拉列表顶部

    我在mySQL中列出了大学和学院 . 该列表从下拉菜单中的a-z填充 . 我想把选项 "no school" 放在列表的顶部,但我无法弄清楚如何做到这一点 . 我们正在使用Smarty,所以看起来我需要对tpl文件做一些事情 . 这是我想要编辑的代码 . <div class="question inner">Area of Study</...
  • 0 votes
     answers
     views

    将php文件转换为smarty for whmcs tpl

    我试图将此代码转换为smarty,以便尽管我的whmcs应该工作,虽然我已经尝试将php文件包含在包含php的tpl中(它完全适用于它自己只是它不能正确显示虽然whmcs )所以我想将当前的php更改为smarty,以便他的代码直接从tpl文件运行 . This是我在包含php页面时的样子,this基本上是我想要的是这是在我用 {php} 和 ?> 标签用 {/php} 替换所有 <?...
  • 0 votes
     answers
     views

    使用Smarty在tpl中调用的php查询

    我n00b,所以基本上我想使用smarty从我的.tpl文件中调用我的index.php文件中的查询: Index.php <?php //Database connection $db = mysqli_connect('xx','xx','','xx') or die('Error connecting to MySQL server.'); //access Smarty temp...
  • 0 votes
     answers
     views

    Smarty循环问题?

    我有 <select> 下拉列表,当一个编辑页面来我需要从另一个mysql表中选择值但已经在文件上使用 <section> 循环时,我如何比较两个循环再次在表单上循环两次的文件 请帮助我开发人员:) <select class="req-string list_login" name="" id="" tit...
  • 0 votes
     answers
     views

    更改SMARTY.config.inc.php文件后发生致命错误Prestashop

    所以我使用prestashop和smarty我改变了' ..\config\smarty.config.inc.php _363915改变了2行!) 我换了几行: (1)原件: require_once(_PS_SMARTY_DIR_.'Smarty.class.php'); 变成: require_once(_PS_SMARTY_DIR_.'SmartyBC.class.php'); (2...
  • 0 votes
     answers
     views

    SugerCRM / SuiteCRM:PHP 5.5.3上的Smarty 2.6.0中的preg_replace()和修饰符“e”出错

    PHP模板引擎:Smarty 2.6.0(/ includes / Smarty)正在使用不推荐的修饰符'e'进行preg_replace函数调用: 阻止导致错误:/include/Smarty/Smarty_Compiler.class.php @第262行 /* replace special blocks by "{php}" */ $source_content = p...

热门问题