开发者

How to add a cake php file in another cake php file

I am using cake php now. I have two file example1.ctp and example2.ctp. I want to include example2.ctp in exa开发者_开发问答mple1.ctp just like how we add php page using "include". I am new to this please suggest me how to do it.


According to me , You have to create Elements..

CakePHP can help you repeat parts of your website that need to be reused. These reusable parts are called Elements.

<?php echo $this->element('ur elements ctp file name'); ?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜