Get the App
SLTechnology News&Howtos  ›  Development  › 

Comparison between THINKPHP2.0 and 3. 0

Shulou Source: shulou.com Published: 2022-06-03 19:04:21 11月12日 Update

This article mainly explains "THINKPHP 2.0 and 3.0 comparison", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "THINKPHP2.0 and 3.0 comparison"!

1.Thinkphp in our entry file writing, may finally add an app::run();

3.0 You don't need it at all, you'll find that otherwise you'll call 2.debug twice. When we developed it, we usually wrote it like this in 2.0, config.php under conf.

However, the current 3.0 declaration method is different, we use define ('APP_DEBUG', true);

And that's the way to say it.

3. In template assignment templates, in 2.0 we would write these $this->display(skin @ module: method);

But we are at 3.0 is $this->display(skin: module: method);

4. When we call the model, we might say $user=D ('user '); this is perfectly fine at 2.0, but

If you write in 3.0, sorry you write in UserModel.php model method simply does not call out, this swollen do?

$user->D ('User '); don't ignore case

At this point, I believe everyone has a deeper understanding of "THINKPHP2.0 and 3.0 comparison," may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Tags: Method time content module model template skin learning sorry practical deeper bad no entrance interest writing size practicality reality that is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Apple macOS Docker OPPO Reno