magento - 如何在 Magento 的 cms 页面上放置 php 语法

如何在 Magento 的 cms 页面上放置 php 代码?

图片在这里:http://screencast.com/t/COgHigLih7

我要放

<?php
 echo "Test";
?>

最佳答案

不能将php代码直接添加到cms页面的内容中

你可以做的是将你的 php 代码添加到 pthml 中,然后从你的 cms 页面调用它

{{block type="core/template" name="contactForm" template="contacts/my_php_code.phtml"}} 

https://stackoverflow.com/questions/16562448/

相关文章:

db2 - SQLRPGLE 中 OPEN 游标上的 SQL -302

itextsharp - 使用 iTextSharp.ShowTextAligned() 添加水印

events - Kendo multiselect,当一个项目被移除时触发一个事件

crystal-reports - 具有内置最终用户报告设计器的报告系统

chef-infra - 是否有相当于 Berkshelf 的产品,但用于 Puppet 模块?

qt - 平均共享 QML 行中的水平空间

scala - 没有用于 future 的守护线程的执行上下文

google-drive-api - 我如何将文件上传到我拥有具有编辑权限的共享链接的 Google

vba - 如何将 Microsoft Word 中当前选定段落的段落编号获取到 AppleScri

haskell - Tree(Int,Int) 在 haskell 中是什么意思?