开发者

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

开发者 https://www.devze.com 2023-04-04 16:56 出处:网络
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

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

精彩评论

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