index.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. //$stime=microtime(true); //获取程序开始执行的时间
  3. //
  4. define('IN_ZHASK',true);
  5. include 'define.php';
  6. include SITE_PATH.'/protected/config/tables.conf.php';
  7. include SITE_PATH.'/protected/config/common.conf.php';
  8. include SITE_PATH.'/protected/config/permissions.conf.php';
  9. include SITE_PATH.'/protected/config/routes.conf.php';
  10. include SITE_PATH.'/protected/config/db.conf.php';
  11. require_once(SITE_PATH.'/protected/class/global.func.php');
  12. require_once(SITE_PATH.'/protected/logic/BaseLogic.php');
  13. #Just include this for production mode
  14. //include $config['BASE_PATH'].'deployment/deploy.php';
  15. include $config['BASE_PATH'].'Doo.php';
  16. include $config['BASE_PATH'].'app/DooConfig.php';
  17. # Uncomment for auto loading the framework classes.
  18. //spl_autoload_register('Doo::autoload');
  19. Doo::conf()->set($config);
  20. # remove this if you wish to see the normal PHP error view.
  21. //include $config['BASE_PATH'].'diagnostic/debug.php';
  22. # database usage
  23. //Doo::useDbReplicate(); #for db replication master-slave usage
  24. //Doo::db()->setMap($dbmap);
  25. //Doo::db()->setDb($dbconfig, $config['APP_MODE']);
  26. //Doo::db()->sql_tracking = true; #for debugging/profiling purpose
  27. Doo::app()->route = $route;
  28. Doo::db()->setDb($dbconfig,'dev');
  29. # Uncomment for DB profiling
  30. //Doo::logger()->beginDbProfile('doowebsite');
  31. Doo::app()->run();die;
  32. //
  33. //
  34. // $etime=microtime(true);//获取程序执行结束的时间
  35. // $total=$etime-$stime; //计算差值
  36. //
  37. // $str_total = var_export($total, TRUE);
  38. //
  39. // if(substr_count($str_total,"E")){ die;
  40. // $float_total = floatval(substr($str_total,5));
  41. // $total = $float_total/100000;
  42. //
  43. // }
  44. //
  45. // echo $total;
  46. //
  47. //Doo::logger()->endDbProfile('doowebsite');
  48. //Doo::logger()->rotateFile(20);
  49. //Doo::logger()->writeDbProfiles();
  50. ?>