Home  >  Article  >  PHP Framework  >  Let’s talk about the difference between CI and TP frameworks?

Let’s talk about the difference between CI and TP frameworks?

藏色散人
藏色散人forward
2021-11-08 16:41:112769browse

The followingthinkphp frameworkThe tutorial column will give you a brief introduction to the differences between CI and TP frameworks. I hope it will be helpful to friends in need!

Let’s talk about the difference between CI and TP frameworks?

Let’s talk about the difference between CI and TP framework?

I have used two different frameworks (here are TP3 and CI2). Let me give you an example:

1. In the custom method, there are many single letters encapsulated in TP. Methods, U, I, etc., are easy to call. For example: when accepting parameters from get/post, TP is I('get.id'), but CI is $this->input->get('id');

2. It is also very convenient to call TP for the model. One M or D is used to complete the task, and then M (tabel)-> chain operation. This is how it is on CI. You need to load $this->load->model('user_model') first, and then use $this->user_model->get_value_by_pk();

3. Database chain Chain operation, the chain operation in TP is really handy and extremely convenient. The one in CI is not bad, and it also supports chain operations, but I still like TP, so I won’t give an example here

4. Loading: When loading on TP, all class libraries are loaded at the beginning. Then there is no need to load them one by one like CI, CI is loaded as needed. There are examples in 2

5. In terms of use, TP is a domestic framework. You can basically find answers to many questions, and the Chinese community is also doing quite well. Although CI is a foreign framework, it is small and convenient. Both are frameworks that can be mastered in minutes;

6. To tell the obvious difference between the two, please go to the official websites of the two companies. After reading the introduction and flipping through the manuals of the two, you will understand a lot.

Recommended: "The latest 10 thinkphp video tutorials"

The above is the detailed content of Let’s talk about the difference between CI and TP frameworks?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete