I wrote a phpMVC framework and used it to write a small project.
A project written in the original php MVC framework CGFramework
Baidu Cloud: http://pan.baidu.com/s/1o6r1Ney Git: https://github.com/Naruone/CGFramework/ Oschina git: https://git.oschina.net/naurone/CGFramework Author: Corey QQ: 675608549
Contact us
- /**
- * Portal file
- * @ Author CG;
- */
- Error_reporting (E_ALL );
- Header ('content-type: text/html; charset = utf-8 ');
- Date_default_timezone_set ('Asia/Shanghai ');
- Define ('', dirname (_ DIR _); // defines the website root directory
- Define ('site _ url', dirname ($ _ SERVER ['script _ name']); // defines the access address
- Chdir (dirname (_ DIR __));
- Require 'init _ autoloader. php ';
- /* Note the following three lines in the debugging phase */
- If (file_exists (. '/cache/complie. php ')){
- Require. '/cache/complie. php ';
- }
- /* ------ Accept ------*/
- Try {
- Vendor \ Application: init (require_once './config. ini. php')-> run ();
- } Catch (Exception $ e ){
- Echo"
Program exception information: ". $ e-> getMessage ().' ';
- Echo 'error File: ', $ e-> getFile (),'
';
- Echo 'number of error rows: ', $ e-> getLine (),'
';
- Echo'
Error code: '. $ E-> getTraceAsString (); - Die;
- }
- /* Comment out the following four lines in the debugging phase */
- If (! File_exists (. '/cache/complie. php ')){
- /* Generate the merged library file */
- Vendor \ cache \ GenerateVendor: get_creater ()-> complie ();
- }
- /* ------ Accept ------*/
|