<? PHP
/*************************************** **************************************** **
* Shenphp entry file index. php $
**************************************** **************************************** *
* License statement: this framework is written out of personal preferences and is not used for commercial purposes. $
**************************************** **************************************** *
* Official Weibo: 3225263431 QQ: 619043894 $
**************************************** **************************************** *
* $ Author: shenxn Shen xiaoning ([email protected]) $
* $ Date: Oct 18,201 3 4:58:48 $
* $ ID $
**************************************** ****************************************/
Header ("Content-Type: text/html; charset = UTF-8"); // you can specify the system output character as UTF-8.
Date_default_timezone_set ("PRC"); // set the time zone
/**
* Framework directory
*/
Define ("root_path", str_replace ("\", "/", dirname (_ file __)).'/');
/**
* Program root directory
*/
Define ('script _ path', dirname (root_path ).'/');
/**
* Module root directory
*/
Define ('module _ path', script_path. 'module ');
// Load the framework
Require_once root_path. '/lib/init. php ';
/**
* Automatically generate the directory structure
*/
Structure: Create ();
/**
* Contains the system configuration file.
*/
$ Config = script_path. "config/config. php ";
If (file_exists ($ config )){
Require_once $ config;
}
/**
* Loading System built-in functions
*/
$ Common_function = root_path. '/common/function. php ';
If (file_exists ($ common_function )){
Require_once $ common_function;
}
/**
* Load Public Functions
*/
$ Common_helper = script_path. '/helper/setup. php ';
If (file_exists ($ common_helper )){
Require_once $ common_helper;
}
/**
* Load smarty
*/
$ Smarty = root_path. "plugin/smarty. Class. php ";
If (file_exists ($ smarty )){
Require_once $ smarty;
}
Require_once root_path. '/controller. php ';
Controller: Dispatch ();
This article is from the "lamp" blog and will not be reproduced!
I plan to write a framework to improve my writing structure.