mkoh.net beta!

Source

Source for: 'html/index.php'


<?php 
// Define path to application directory
defined('ROOT_PATH') 
    || define('ROOT_PATH', realpath(dirname(__FILE__) . '/..'));
// Define path to application directory
defined('APPLICATION_PATH') 
    || define('APPLICATION_PATH', ROOT_PATH . '/application');

// Define application environment
defined('APPLICATION_ENV') 
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

set_include_path(
    '.' . PATH_SEPARATOR . 
    ROOT_PATH.'/library' . PATH_SEPARATOR . 
    APPLICATION_PATH.'/library' . PATH_SEPARATOR .
#    APPLICATION_PATH.'/modules/default/models' . PATH_SEPARATOR .
    get_include_path());

require_once 'Zend/Registry.php';
require_once 'MkohNet/Config/Ini.php';
$config = new MkohNet_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV);
Zend_Registry::set('config', $config);

// Page cache
require_once 'Zend/Cache.php';
$backendOptions = array(
    'cache_dir' => $config->storage->filecache_dir
);
// getting a Zend_Cache_Frontend_Page object
$pageCache = Zend_Cache::factory('Page',
                             'File',
                             $config->caches->page->frontend->toArray(),
                             $backendOptions);

$pageCache->start();
Zend_Registry::set('PageCache', $pageCache);

/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    $config
);
$application->bootstrap('autoloader') 
            ->bootstrap()
            ->run();

Comments

No comments, why not write one?

Add a comment

 ______    __   __   _    _      ___      ______   __   __  
|      \\  \ \\/ // | |  | ||   / _ \\   /_   _//  \ \\/ // 
|  --  //   \ ` //  | |/\| ||  | / \ ||  `-| |,-    \ ` //  
|  --  \\    | ||   |  /\  ||  | \_/ ||    | ||      | ||   
|______//    |_||   |_// \_||   \___//     |_||      |_||   
`------`     `-`'   `-`   `-`   `---`      `-`'      `-`'