common.conf.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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/Kuala_Lumpur');
  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('..').'/dongleerp/';
  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'] = TRUE;
  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. //$config['ERROR_404_DOCUMENT'] = 'error.php';
  36. $config['ERROR_404_ROUTE'] = '/error';
  37. define ( "WEB_SITE", "http://cld.com" );
  38. define ( "WEB_SITE_GLOBAL", WEB_SITE . "/global/" );
  39. define ( "REAL_PATH", realpath ( '..' ) );
  40. define ( "SITE_PATH", REAL_PATH . "/dongleerp/" );
  41. //$config['pagesize'] = 10;