index.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. //ini_set('display_errors', on);
  3. include './protected/config/common.conf.php';
  4. include './protected/config/routes.conf.php';
  5. include './protected/config/db.conf.php';
  6. #Just include this for production mode
  7. //include $config['BASE_PATH'].'deployment/deploy.php';
  8. include './protected/class/global.func.php';
  9. include $config['BASE_PATH'] . 'Doo.php';
  10. include $config['BASE_PATH'] . 'app/DooConfig.php';
  11. # Uncomment for auto loading the framework classes.
  12. spl_autoload_register('Doo::autoload');
  13. Doo::conf()->set($config);
  14. # remove this if you wish to see the normal PHP error view.
  15. //include $config['BASE_PATH'] . 'diagnostic/debug.php';
  16. # database usage
  17. //Doo::useDbReplicate(); #for db replication master-slave usage
  18. //Doo::db()->setMap($dbmap);
  19. Doo::db()->setDb($dbconfig, $config['APP_MODE']);
  20. Doo::db()->sql_tracking = False; #for debugging/profiling purpose
  21. Doo::app()->route = $route;
  22. # Uncomment for DB profiling
  23. //Doo::logger()->beginDbProfile('doowebsite');
  24. // Doo::cache('front')->start();
  25. Doo::app()->run();
  26. // Doo::cache('front')->end();
  27. //Doo::logger()->endDbProfile('doowebsite');
  28. //Doo::logger()->rotateFile(20);
  29. //Doo::logger()->writeDbProfiles();
  30. ?>