PHP is the easiest to customize your own framework to create a directory structure (2)

1. mvc directory structure 

 2. Directory Explanation

KJ: project name

  core: framework core directory

          KJ.php framework running entry

  index: framework module

           controller: module controller

           model: module model database operation

           view: page display html

  index.php: entry of index module framework

3. The index.php framework entry file introduces the framework

<?php
require "./core/KJ.php";

4. KJ.php framework running entry

<?php
final class KJ{
    public static function run(){
        echo '框架运行中';
    }
}
KJ::run();

5. Framework operation

Guess you like

Origin blog.csdn.net/weixin_39934453/article/details/132157738