zoukankan      html  css  js  c++  java
  • mycncart 前台代码跟踪

    1.进入根目录的入口文件,index.php
    
    require_once(DIR_SYSTEM . 'startup.php');//最为重要的一步
    
    start('catalog');//执行了这个方法
    
    
    2.根目录/mycncart/system/startup.php 文件
    在这个文件里,定义了需要php版本,php配置和一些server
    
    spl_autoload_register('library');//自动加载函数
    加载地址为:$file = DIR_SYSTEM . 'library/' . str_replace('\', '/', strtolower($class)) . '.php';#mycncart/system/library/
    
    引入了enginehe 和helper的一些函数
    这个文件中,注意是一些文件加载
    
    3.根目录/mycncart/system/framework.php 文件
    
    registry:注册类和配置类(config)
    
    两个配置文件:system/config
    default.php
    和前台配置文件默认为catalog.php  他会覆盖default.php 中的配置
    
    $config->get('action_default');可以得到配置文件的值
    
    
    4.路由
    $controller->dispatch(new Action($config->get('action_router')), new Action($config->get('action_error')));
    
    
    // Route
    if (isset($this->request->get['route']) && $this->request->get['route'] != 'startup/router') {
        $route = $this->request->get['route'];
    } else {
        $route = $this->config->get('action_default');
    }


  • 相关阅读:
    F12
    InnerClass.java
    Java8
    对象下—练习4
    对象下—练习3
    模板方法
    对象下—练习2
    对象下—举例二、三
    【J-Link】J-Link不支持(版本太低)
    【Android】安装插件 + 改变文字大小、颜色 + 隐藏代码区块的直线
  • 原文地址:https://www.cnblogs.com/myvic/p/6344563.html
Copyright © 2011-2022 走看看