Home Backend Development PHP Tutorial Resource sharing about TP5.0 MVC introductory video

Resource sharing about TP5.0 MVC introductory video

Aug 31, 2017 am 10:36 AM
tp5.0 video resource

The latest ThinkPHP5.0 is the best among many domestic PHP development frameworks. 1. ThinkPHP5 runs based on MVC process; 2. MVC is a scientific and advanced project development model that can greatly improve development efficiency; 3. It makes sense for the ThinkPHP5 series of courses produced by Lida Classroom to take MVC as the first lesson. The course has been completely revised in 2017. Each video should be no longer than 10 minutes as much as possible, so that everyone can make full use of the fragmented time to study.

Resource sharing about TP5.0 MVC introductory video

Course playback address: http://www.php.cn/course/363.html

The teacher’s teaching style:

The teacher teaches in simple terms, Clear organization, layer-by-layer analysis, interlocking links, rigorous argumentation, and rigorous structure. Use the logical power of thinking to attract students' attention, and use reason to control the classroom teaching process. The teaching skills are full of wit. Various teaching methods and techniques are readily available and can be used freely and appropriately without any trace of polishing.

The more difficult part in this video should be: mvc creates the entry file:

1. Writing the entry file

1)首先要创建一个入口文件 例如:index.PHP

   2 ) 要确定入口文件将要做什么
Copy after login
 <?php  
     /**
 * 入口文件
 * 1.定义常量
 * 2.加载函数库
 * 3.启动框架
 */// echo &#39;123&#39; ;
 die;define(&#39;MVC&#39;, realpath(&#39;./&#39;));//当前框架所在目录
 define(&#39;CORE&#39;,MVC.&#39;/core&#39;);//项目中的函数库
 define(&#39;APP&#39;,MVC.&#39;/app&#39;); //项目文件所在目录
 define(&#39;MODULE&#39;,&#39;app&#39;); //控制器
 define(&#39;DEBUG&#39;,true); // var_dump(APP);
 die;// var_dump(MODULE);die;if(DEBUG) {
    ini_set(&#39;display_error&#39;,&#39;On&#39;);
} else {
    ini_set(&#39;display_error&#39;,&#39;Off&#39;);
}

include CORE.&#39;/common/function.php&#39;;
include CORE.&#39;/mvc.php&#39;;

spl_autoload_register(&#39;\core\mvc::load&#39;);//当没有这个类自动执行
 \core\mvc::run();  //每次调用这个方法
Copy after login

3) Create the core file of the project and then create the function library. Then create a file

4) Load the function library

include CORE. '/Function library name/file name';

5) Create a core file and load the core file

6) When calling the core file, you need to use the namespace core. Since there are many classes called, We can set it as a static method

The above is the detailed content of Resource sharing about TP5.0 MVC introductory video. For more information, please follow other related articles on the PHP Chinese website!

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 Article Tags

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)

Where are video files stored in browser cache? Where are video files stored in browser cache? Feb 19, 2024 pm 05:09 PM

Where are video files stored in browser cache?

Is it infringing to post other people's videos on Douyin? How does it edit videos without infringement? Is it infringing to post other people's videos on Douyin? How does it edit videos without infringement? Mar 21, 2024 pm 05:57 PM

Is it infringing to post other people's videos on Douyin? How does it edit videos without infringement?

How to remove video watermark in Wink How to remove video watermark in Wink Feb 23, 2024 pm 07:22 PM

How to remove video watermark in Wink

How to make money from posting videos on Douyin? How can a newbie make money on Douyin? How to make money from posting videos on Douyin? How can a newbie make money on Douyin? Mar 21, 2024 pm 08:17 PM

How to make money from posting videos on Douyin? How can a newbie make money on Douyin?

How to publish Xiaohongshu video works? What should I pay attention to when posting videos? How to publish Xiaohongshu video works? What should I pay attention to when posting videos? Mar 23, 2024 pm 08:50 PM

How to publish Xiaohongshu video works? What should I pay attention to when posting videos?

2 Ways to Remove Slow Motion from Videos on iPhone 2 Ways to Remove Slow Motion from Videos on iPhone Mar 04, 2024 am 10:46 AM

2 Ways to Remove Slow Motion from Videos on iPhone

How to convert videos downloaded by uc browser into local videos How to convert videos downloaded by uc browser into local videos Feb 29, 2024 pm 10:19 PM

How to convert videos downloaded by uc browser into local videos

How to post videos on Weibo without compressing the image quality_How to post videos on Weibo without compressing the image quality How to post videos on Weibo without compressing the image quality_How to post videos on Weibo without compressing the image quality Mar 30, 2024 pm 12:26 PM

How to post videos on Weibo without compressing the image quality_How to post videos on Weibo without compressing the image quality

See all articles