index.php 888 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. // Define path to application directory
  3. defined('APPLICATION_PATH')
  4. || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
  5. // Define application environment
  6. defined('APPLICATION_ENV')
  7. || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
  8. set_include_path(realpath(dirname(__FILE__) . '/../vendor/zendframework/zendframework1/library'));
  9. require_once 'Zend/Loader/Autoloader/Resource.php';
  10. $resources = new Zend_Loader_Autoloader_Resource(array(
  11. 'namespace' => '',
  12. 'basePath' => APPLICATION_PATH
  13. ));
  14. $resources->addResourceType('model', 'models', 'Model');
  15. require_once 'Zend/Application.php';
  16. // Create application, bootstrap, and run
  17. $application = new Zend_Application(
  18. APPLICATION_ENV,
  19. APPLICATION_PATH . '/configs/application.ini'
  20. );
  21. $application->bootstrap()
  22. ->run();