common.conf.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. /*
  3. * Common configuration that can be used throughout the application
  4. * Please refer to DooConfig class in the API doc for a complete list of configurations
  5. * Access via Singleton, eg. Doo::conf()->BASE_PATH;
  6. */
  7. error_reporting(E_ALL | E_STRICT);
  8. date_default_timezone_set('Asia/ShangHai');
  9. /**
  10. * for benchmark purpose, call Doo::benchmark() for time used.
  11. */
  12. $config['START_TIME'] = microtime(true);
  13. //For framework use. Must be defined. Use full absolute paths and end them with '/' eg. /var/www/project/
  14. $config['SITE_PATH'] = realpath('..') . '/ssov2/';
  15. //$config['PROTECTED_FOLDER'] = 'protected/';
  16. $config['BASE_PATH'] = realpath('..') . '/dooframework/';
  17. //for production mode use 'prod'
  18. $config['APP_MODE'] = 'dev';
  19. //----------------- optional, if not defined, default settings are optimized for production mode ----------------
  20. //if your root directory is /var/www/ and you place this in a subfolder eg. 'app', define SUBFOLDER = '/app/'
  21. $config['SUBFOLDER'] = str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\', '/', $config['SITE_PATH']));
  22. if (strpos($config['SUBFOLDER'], '/') !== 0) {
  23. $config['SUBFOLDER'] = '/' . $config['SUBFOLDER'];
  24. }
  25. $config['APP_URL'] = 'http://' . $_SERVER['HTTP_HOST'] . $config['SUBFOLDER'];
  26. //$config['AUTOROUTE'] = TRUE;
  27. $config['DEBUG_ENABLED'] = False;
  28. //$config['TEMPLATE_COMPILE_ALWAYS'] = TRUE;
  29. //register functions to be used with your template files
  30. //$config['TEMPLATE_GLOBAL_TAGS'] = array('url', 'url2', 'time', 'isset', 'empty');
  31. /**
  32. * Path to store logs/profiles when using with the logger tool. This is needed for writing log files and using the log viewer tool
  33. */
  34. //$config['LOG_PATH'] = '/var/logs/';
  35. /**
  36. * defined either Document or Route to be loaded/executed when requested page is not found
  37. * A 404 route must be one of the routes defined in routes.conf.php (if autoroute on, make sure the controller and method exist)
  38. * Error document must be more than 512 bytes as IE sees it as a normal 404 sent if < 512b
  39. */
  40. //$config['ERROR_404_DOCUMENT'] = 'error.php';
  41. $config['ERROR_404_ROUTE'] = '/error';
  42. /**
  43. * Settings for memcache server connections, you don't have to set if using localhost only.
  44. * host, port, persistent, weight
  45. * $config['MEMCACHE'] = array(
  46. * array('192.168.1.31', '11211', true, 40),
  47. * array('192.168.1.23', '11211', true, 80)
  48. * );
  49. */
  50. /**
  51. * Defines modules that are allowed to be accessed from an auto route URI.
  52. * Example, we have a module in SITE_PATH/PROTECTED_FOLDER/module/example
  53. * It can be accessed via http://localhost/example/controller/method/parameters
  54. *
  55. * $config['MODULES'] = array('example');
  56. *
  57. */
  58. /**
  59. * Unique string ID of the application to be used with PHP 5.3 namespace and auto loading of namespaced classes
  60. * If you wish to use namespace with the framework, your classes must have a namespace starting with this ID.
  61. * Example below is located at /var/www/app/protected/controller/test and can be access via autoroute http://localhost/test/my/method
  62. * <?php
  63. * namespace myapp\controller\test;
  64. * class MyController extends \DooController {
  65. * .....
  66. * } ?>
  67. *
  68. * You would need to enable autoload to use Namespace classes in index.php
  69. * spl_autoload_register('Doo::autoload');
  70. *
  71. * $config['APP_NAMESPACE_ID'] = 'myapp';
  72. *
  73. */
  74. /**
  75. * To enable autoloading, add directories which consist of the classes needed in your application.
  76. *
  77. * $config['AUTOLOAD'] = array(
  78. //internal directories, live in the app
  79. 'class', 'model', 'module/example/controller',
  80. //external directories, live outside the app
  81. '/var/php/library/classes'
  82. );
  83. */
  84. /**
  85. * you can include self defined config, retrieved via Doo::conf()->variable
  86. * Use lower case for you own settings for future Compability with DooPHP
  87. */
  88. //$config['pagesize'] = 10;
  89. $config['AUTHKEY'] = 'z685b7q4V8ifR7F9T71eUdH8p9k5i135G6p6C9Mek4m3q7y7Uba2XbXdKfXbr9Af';
  90. $config['COOKIEPRE'] = 'p6C4m3_NZ_';
  91. $config['COOKIEPRE_WK'] = 'GLgxZR_WK_';
  92. $config['COOKIEPRE_WD'] = 'cPwSEd_WD_';
  93. $config['APP_THEME_FRONT'] = 'v2';
  94. $config['APP_THEME'] = $config['APP_THEME_FRONT'].'/';
  95. $config['APP_JS_URL'] = $config['APP_URL'].'global/'.$config['APP_THEME_FRONT'].'/js/';
  96. $config['APP_IMG_URL'] = $config['APP_URL'].'global/'.$config['APP_THEME_FRONT'].'/images/';
  97. $config['APP_CSS_URL'] = $config['APP_URL'].'global/'.$config['APP_THEME_FRONT'].'/css/';