Table of Contents
What are the improvements from THINKPHP2.0 to 3.0?
Home Backend Development PHP Tutorial What are the improvements from THINKPHP2.0 to 3.0_PHP Tutorial

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

Jul 13, 2016 am 09:59 AM
Which Improve have

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...
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1269
29
C# Tutorial
1248
24
Performance and security of PHP5 and PHP8: comparison and improvements Performance and security of PHP5 and PHP8: comparison and improvements Jan 26, 2024 am 10:19 AM

PHP is a widely used server-side scripting language used for developing web applications. It has developed into several versions, and this article will mainly discuss the comparison between PHP5 and PHP8, with a special focus on its improvements in performance and security. First let's take a look at some features of PHP5. PHP5 was released in 2004 and introduced many new functions and features, such as object-oriented programming (OOP), exception handling, namespaces, etc. These features make PHP5 more powerful and flexible, allowing developers to

PHP8.1 update: improvements to string dynamic replacement function PHP8.1 update: improvements to string dynamic replacement function Jul 09, 2023 pm 08:37 PM

PHP8.1 update: improvements to the string dynamic replacement function PHP8.1 is a widely used server-side scripting language that is often used to develop websites and web applications. In the PHP8.1 update, an important improvement is the improvement of the string dynamic replacement function. This improvement makes string operations more concise and efficient, improving the readability and maintainability of the code. This improvement is introduced below, with code examples illustrating its use. Before PHP8.0, we used the string replacement function str_

Improvements in PHP7: no more undefined errors Improvements in PHP7: no more undefined errors Mar 04, 2024 pm 06:15 PM

Improvements in PHP7: No more undefined errors. PHP7 is a major version update of the PHP language, which brings many important improvements and optimizations. One of the significant improvements is that undefined errors no longer appear when dealing with undefined variables, which brings a better user experience to developers. Before PHP7, if undefined variables were used in the code, an undefined error would occur. Developers needed to manually check or set the error reporting level to avoid this situation.

Which games are suitable for playing with i34150 and 1G independent graphics (which games is suitable for i34150) Which games are suitable for playing with i34150 and 1G independent graphics (which games is suitable for i34150) Jan 05, 2024 pm 08:24 PM

What games can be played with i34150 with 1G independent graphics? Can it play small games such as LoL? GTX750 and GTX750TI are very suitable graphics card choices. If you just play some small games or not play games, it is recommended to use the i34150 integrated graphics card. Generally speaking, the price difference between graphics cards and processors is not very big, so it is important to choose a reasonable combination. If you need 2G of video memory, it is recommended to choose GTX750TI; if you only need 1G of video memory, just choose GTX750. GTX750TI can be seen as an enhanced version of GTX750, with overclocking capabilities. Which graphics card can be paired with i34150 depends on your needs. If you plan to play stand-alone games, it is recommended that you consider changing the graphics card. you can choose

PHP8.1 update: improvements to AsyncWait objects PHP8.1 update: improvements to AsyncWait objects Jul 08, 2023 pm 04:04 PM

PHP8.1 update: improvements to the AsyncWait object Recently, PHP launched its latest version 8.1, and one of the eye-catching updates is the improvement of the AsyncWait object. The AsyncWait object is an important concept in PHP asynchronous programming, which allows developers to use asynchronous programming patterns to improve performance and responsiveness. This article will introduce the improvements to the AsyncWait object in PHP8.1 and give some code examples to illustrate its usage and advantages. In previous versions, Asy

PHP8.1 introduces improvements to Generators PHP8.1 introduces improvements to Generators Jul 07, 2023 pm 10:57 PM

Improvements in Generators introduced in PHP 8.1 Generators are a powerful feature introduced in PHP 5.5, which provides a more efficient way to implement iterators. In the PHP8.1 version, Generators have undergone some important improvements, bringing more convenience and flexibility to developers. In this article, we explore these improvements and illustrate their use with code examples. 1. Return key name and key value before PHP8.1

User feedback and improvement strategies for PHP blog system User feedback and improvement strategies for PHP blog system Aug 09, 2023 am 10:58 AM

User feedback and improvement strategies for PHP blog system Introduction: With the popularity and development of the Internet, blogs have become an important way for people to share their knowledge and experience. In order to meet the needs of users, it is crucial to develop a stable, easy-to-use, and comprehensive blog system. However, as the software continues to iterate, user feedback and suggestions become particularly important because they can help us discover system problems and improve the system. This article will discuss user feedback and improvement strategies for the PHP blog system, and explain the improvement steps and methods through code examples.

What kind of computer equipment is needed for applied physics (what are the required courses for applied physics) What kind of computer equipment is needed for applied physics (what are the required courses for applied physics) Dec 30, 2023 pm 12:11 PM

What computer to use for applied physics requires high performance. 2. The reason is that the physics major involves a large number of data processing, simulation calculations and programming tasks, and requires a computer with higher configuration to support these tasks. Higher processor performance and memory capacity can improve computing speed and operating efficiency, larger storage space can store large amounts of data and simulation results, and better graphics card performance can support physical simulation and visualization tasks. 3. In addition, students majoring in physics may also need to use some specific software tools, such as numerical calculation software, simulation software and data analysis software, etc. These software also have certain requirements for computer configuration. Therefore, in order to better support study and research work, physics students usually need to choose a computer with higher configuration

See all articles