I wrote a phpMVC framework and wrote a small project with the framework-php Tutorial.

Source: Internet
Author: User
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

  1. /**
  2. * Portal file
  3. * @ Author CG;
  4. */
  5. Error_reporting (E_ALL );
  6. Header ('content-type: text/html; charset = utf-8 ');
  7. Date_default_timezone_set ('Asia/Shanghai ');
  8. Define ('', dirname (_ DIR _); // defines the website root directory
  9. Define ('site _ url', dirname ($ _ SERVER ['script _ name']); // defines the access address
  10. Chdir (dirname (_ DIR __));
  11. Require 'init _ autoloader. php ';
  12. /* Note the following three lines in the debugging phase */
  13. If (file_exists (. '/cache/complie. php ')){
  14. Require. '/cache/complie. php ';
  15. }
  16. /* ------ Accept ------*/
  17. Try {
  18. Vendor \ Application: init (require_once './config. ini. php')-> run ();
  19. } Catch (Exception $ e ){
  20. Echo"


    Program exception information: ". $ e-> getMessage ().'
    ';
  21. Echo 'error File: ', $ e-> getFile (),'
    ';
  22. Echo 'number of error rows: ', $ e-> getLine (),'
    ';
  23. Echo'
    Error code:
    '. $ E-> getTraceAsString ();
  24. Die;
  25. }
  26. /* Comment out the following four lines in the debugging phase */
  27. If (! File_exists (. '/cache/complie. php ')){
  28. /* Generate the merged library file */
  29. Vendor \ cache \ GenerateVendor: get_creater ()-> complie ();
  30. }
  31. /* ------ Accept ------*/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.