Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想创建一个多列页面。我不确定我应该更喜欢哪种方式来适应 cakephp 的编码规则。
我应该在 view//index.ctp 还是 layouts/default.ctp 上创建列
如果 layouts/default.ctp 是合适的方式,我该如何获取其他内容?如您所知,有一行用于获取控制器的视图内容,例如<?php echo $this->fetch('content'); ?>如何获取其他内容?
<?php echo $this->fetch('content'); ?>
只需在其他地方声明一个块,例如在您的视图文件中,使用 start() 和 stop() 来定义一个块并使用 fetch() 输出它。例如 start('menu'); 然后调用 fetch('menu') 将显示开始和停止调用之间的内容。
读这个:
嗨,我正在尝试确保没有任何文件具有
<?
(PHP 短标签),他们确实有
<?PHP
到目前为止,我必须
grep -r -E '<?*' * | grep -Ev '<?p