index.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Requests collector.
  4. *
  5. * This file collects requests if:
  6. * - no mod_rewrite is avilable or .htaccess files are not supported
  7. * - requires App.baseUrl to be uncommented in app/config/core.php
  8. * - app/webroot is not set as a document root.
  9. *
  10. * PHP versions 4 and 5
  11. *
  12. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  13. * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
  14. *
  15. * Licensed under The MIT License
  16. * Redistributions of files must retain the above copyright notice.
  17. *
  18. * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
  19. * @link http://cakephp.org
  20. * @package cake
  21. * @since CakePHP(tm) v 0.2.9
  22. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  23. */
  24. /**
  25. * Get Cake's root directory
  26. */
  27. define('APP_DIR', 'app');
  28. define('DS', DIRECTORY_SEPARATOR);
  29. define('ROOT', dirname(__FILE__));
  30. define('WEBROOT_DIR', 'webroot');
  31. define('WWW_ROOT', ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS);
  32. /**
  33. * This only needs to be changed if the "cake" directory is located
  34. * outside of the distributed structure.
  35. * Full path to the directory containing "cake". Do not add trailing directory separator
  36. */
  37. if (!defined('CAKE_CORE_INCLUDE_PATH')) {
  38. define('CAKE_CORE_INCLUDE_PATH', ROOT);
  39. }
  40. /**
  41. * Set the include path or define app and core path
  42. */
  43. if (function_exists('ini_set')) {
  44. ini_set('include_path',
  45. ini_get('include_path') . PATH_SEPARATOR . CAKE_CORE_INCLUDE_PATH
  46. . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS
  47. );
  48. define('APP_PATH', null);
  49. define('CORE_PATH', null);
  50. } else {
  51. define('APP_PATH', ROOT . DS . APP_DIR . DS);
  52. define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
  53. }
  54. require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php';
  55. ?>