What are the improvements from THINKPHP2.0 to 3.0_PHP Tutorial

WBOY
Release: 2016-07-13 09:59:24
Original
801 people have browsed it

What are the improvements from THINKPHP2.0 to 3.0?

This article mainly introduces what improvements are there from THINKPHP2.0 to 3.0. I personally summarized 6 small points. Friends can refer to it

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

at the end.

THINKPHP2.0到3.0有哪些改进之处   帮客之家

It is completely unnecessary in 3.0. You will find that otherwise there will be two calls to 2.debug. When we were developing, we usually wrote like this in 2.0, 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/975901.htmlTechArticleWhat are the improvements in THINKPHP2.0 to 3.0? This article mainly introduces what are the improvements in THINKPHP2.0 to 3.0. I personally summarized 6 points. Friends in need can refer to our...
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