main.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * dolphin. Collection of useful PHP skeletons.
  4. * Copyright (C) 2009 Johannes 'Banana' Keßler
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. // to get the system messages make it true
  20. define('DEBUG',true);
  21. // path settings
  22. define('PATH_ABSOLUTE',str_replace('/conf','',dirname(__FILE__)));
  23. if(dirname($_SERVER['SCRIPT_NAME']) === '/') {
  24. define('WEBROOT_PATH','');
  25. }
  26. else {
  27. define('WEBROOT_PATH',dirname($_SERVER['SCRIPT_NAME']));
  28. }
  29. define('TMP_DIR',PATH_ABSOLUTE.'/tmp');
  30. define('PATH_LIB','lib');
  31. // time settings
  32. date_default_timezone_set('Europe/Berlin');
  33. // session
  34. define("SESSION_LIFETIME",43200); // 8 hours
  35. define("SESSION_NAME","your-session-name");
  36. define("SESSION_SAVE_PATH",TMP_DIR.'/session');
  37. ?>