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');
    }


  • 相关阅读:
    Oracle与MySQL的几点区别
    MySQL使用Union创建视图报错
    MySQL指定mysqld启动时所加载的配置文件
    MySQL使用位运算
    django rest framework(3)
    Django Rest Framework(2)
    Django 之缓存
    RESTful API
    restful framework 认证源码流程
    其他排序
  • 原文地址:https://www.cnblogs.com/myvic/p/6344563.html
Copyright © 2011-2022 走看看