Home > Backend Development > PHP Tutorial > What are the improvements from THINKPHP2.0 to 3.0? thinkphp2.03.0_PHP tutorial

What are the improvements from THINKPHP2.0 to 3.0? thinkphp2.03.0_PHP tutorial

WBOY
Release: 2016-07-13 10:10:13
Original
797 people have browsed it

What are the improvements from THINKPHP2.0 to 3.0? thinkphp2.03.0

1. Think about how we write the entry file in php. We may need to add an app::run();

at the end.

It is completely unnecessary in 3.0. You will find that otherwise there will be two calls to 2.debug. When we are developing, we usually write like this in 2.0, in config.php under conf

But the declaration method in 3.0 is different now, we use define(‘APP_DEBUG’,true);

This is how to state it

3. When assigning templates to templates, in 2.0 we will write these $this->display(skin@module:method);

But in 3.0 we have $this->display(skin:module:method);

4. When we call the model, we may do this $user=D('user'); This is completely fine in 2.0, but

If you write on 3.0, I’m sorry that the model method you wrote in UserModel.php cannot be called at all. What should I do about this?

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

The deployment directory of 5.3.0 is different from that of 2.0. You have to check it out for yourself

The custom directories or paths of 6.3.0 are different from those of 2.0. You should check the manual reference. In fact, you can also write it yourself

That’s all for today, please continue updating slowly~~

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/937087.htmlTechArticleWhat are the improvements from THINKPHP2.0 to 3.0, thinkphp2.03.0 1. How to write our entry file in thinkphp, You may need to add an app::run(); in the end. It will be completely unnecessary in 3.0. You will find that otherwise...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template