index.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /* SVN FILE: $Id$ */
  3. /**
  4. * Requests collector.
  5. *
  6. * This file collects requests if:
  7. * - no mod_rewrite is avilable or .htaccess files are not supported
  8. * -/public is not set as a web root.
  9. *
  10. * PHP versions 4 and 5
  11. *
  12. * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
  13. * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
  14. *
  15. * Licensed under The MIT License
  16. * Redistributions of files must retain the above copyright notice.
  17. *
  18. * @filesource
  19. * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
  20. * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
  21. * @package cake
  22. * @since CakePHP(tm) v 0.2.9
  23. * @version $Revision$
  24. * @modifiedby $LastChangedBy$
  25. * @lastmodified $Date$
  26. * @license http://www.opensource.org/licenses/mit-license.php The MIT License
  27. */
  28. /**
  29. * Get Cake's root directory
  30. */
  31. define('APP_DIR', 'app');
  32. define('DS', DIRECTORY_SEPARATOR);
  33. define('ROOT', dirname(__FILE__));
  34. define('WEBROOT_DIR', 'webroot');
  35. define('WWW_ROOT', ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS);
  36. /**
  37. * This only needs to be changed if the cake installed libs are located
  38. * outside of the distributed directory structure.
  39. */
  40. if (!defined('CAKE_CORE_INCLUDE_PATH')) {
  41. //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
  42. define('CAKE_CORE_INCLUDE_PATH', ROOT);
  43. }
  44. if (function_exists('ini_set')) {
  45. ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS);
  46. define('APP_PATH', null);
  47. define('CORE_PATH', null);
  48. } else {
  49. define('APP_PATH', ROOT . DS . APP_DIR . DS);
  50. define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
  51. }
  52. require CORE_PATH . 'cake' . DS . 'basics.php';
  53. $TIME_START = getMicrotime();
  54. require CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php';
  55. require LIBS . 'object.php';
  56. require LIBS . 'inflector.php';
  57. require LIBS . 'configure.php';
  58. $bootstrap = true;
  59. $url = null;
  60. require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php';
  61. ?>