我正在学习一个 zend 框架。我正在使用 tinymce 编辑器在网站上显示动态内容。现在我想显示页眉和页脚来自布局的页面,而布局内容来自名为 cms 的数据库表。我的整个页面内容被存储在我包含在layout.phtml中的database..header和footer页面中。我不知道如何用布局显示它,我的布局页面如下:
<?php echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<?php echo CSS_PATH.'/jquery.jqplot.min.css';?>" />
<script src="<?php echo CSS_JS.'/jquery.ui.widget.mn.min.js';?>" type="text/javascript"></script>
<script src="<?php echo CSS_JS.'/jquery.effects.corin.js';?>" type="text/javascript"></script>
<script src="<?php echo CSS_JS.'/jquery.ui.accordioe.min.js';?>" type="text/javascript"></script>
<script src="<?php echo CSS_JS.'/jquery.effects.slide.min.js';?>" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="<?php echo CSS_JS.'/jqPlot/jquery.jqplot.min.js';?>"></script>
<script language="javascript" type="text/javascript" src="<?php echo CSS_JS.'/jqPlot/plugins/jqplot.barRenderer.min.js';?>"></script>
<script language="javascript" type="text/javascript" src="<?php echo CSS_JS.'/jqPlot/plugins/jqplot.pieRenderer.min.js';?>"></script>
<script language="javascript" type="text/javascript" src="<?php echo CSS_JS.'/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js';?>"></script>
<script language="javascript" type="text/javascript" src="<?php echo CSS_JS.'/jqPlot/plugins/jqplot.highlighter.min.js';?>"></script>
<script language="javascript" type="text/javascript" src="<?php echo CSS_JS.'/jqPlot/plugins/jqplot.pointLabels.min.js';?>"></script>
<script src="<?php echo CSS_JS.'/setup.js';?>" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
setupDashboardChart('chart1');
setupLeftMenu();
setSidebarHeight();
});
</script>
</head>
<body>
</div>
<?php echo $this->render('header.phtml') ?>
<?php echo $this->layout()->content ?>
<?php echo $this->render('footer.phtml') ?>
</body>
</html>
并且当我从数据库中回显内容时,它会显示 php 代码...请帮助