Advertisement
Guest User

initialize.php

a guest
Sep 30th, 2012
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.80 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. // Define the core paths
  5. // Define them as absolute paths to make sure that require_once works as expected
  6.  
  7. // DIRECTORY_SEPARATOR is a PHP pre-defined constant
  8. // (\ for Windows, / for Unix)
  9. defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);
  10. $rootLocationArray = explode(DS, $_SERVER['SCRIPT_NAME']);
  11. $rootLocation      = $rootLocationArray[1];
  12.  
  13. defined('SITE_ROOT') ? null : define('SITE_ROOT', $_SERVER['DOCUMENT_ROOT']);
  14.  
  15. //    define('SITE_ROOT', realpath('../'));
  16. //define('SITE_ROOT', '/var/www/cspum');
  17.  
  18. defined('LIB_PATH') ? null : define('LIB_PATH', SITE_ROOT . DS . $rootLocation . DS . 'classes' . DS);
  19. defined('APP_PATH') ? null : define('APP_PATH', SITE_ROOT . DS . $rootLocation . DS);
  20.  
  21. // Add include path to PHP.ini
  22. $path = array(
  23.     LIB_PATH,
  24.     SITE_ROOT . DS . $rootLocation . DS . 'includes',
  25.     get_include_path()
  26. );
  27. set_include_path(implode(PATH_SEPARATOR, $path));
  28.  
  29. ini_set('magic_quotes_gpc', 0);
  30.  
  31. // load config file first
  32. require_once('constants.php');
  33.  
  34. // FirePHPCore
  35. @include('FirePHP.class.php');
  36. @include('fb.php');
  37.  
  38. // load basic functions next so that everything after can use them
  39. require_once('functions.php');
  40.  
  41. // load core objects
  42. require_once('KLogger.php');
  43. require_once('Others.php');
  44. require_once('ClassAbstract.php');
  45. require_once('class.phpmailer.php');
  46. require_once('class.smtp.php');
  47. //require_once(LIB_PATH.DS.'pagination.php');
  48. //require_once(LIB_PATH.DS."phpMailer".DS."phpmailer.inc.php");
  49. //require_once(LIB_PATH.DS."phpMailer".DS."smtp.inc.php");
  50. //require_once(LIB_PATH.DS."phpMailer".DS."language".DS."phpmailer.lang-en.php");
  51.  
  52. // load database-related classes
  53. require_once('Mysql.php');
  54. require_once('Membership.php');
  55. //require_once('user.php');
  56. //require_once('photograph.php');
  57. //require_once('comment.php');
  58.  
  59.  
  60. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement