Exemplo n.º 1
0
$cobra['path.app'] = $__home . '/apps';
$cobra['path.cache'] = $__home . '/cache';
$cobra['path.log'] = $__home . '/log';
$cobra['path.error'] = $__home . '/error';
$cobra['path.htdocs'] = $__home . '/../htdocs';
// system files
$cobra['path.bootstrap'] = __FILE__;
$cobra['path.kernel'] = $__home . '/k.php';
$cobra['path.config'] = $__home . '/co.ses.php';
// load kernel
if (!is_readable($cobra['path.kernel'])) {
    die('boot::kernel');
}
// else
require_once $cobra['path.kernel'];
// load config
if (!is_readable($cobra['path.config'])) {
    die('boot::config');
}
// else
require_once $cobra['path.config'];
// custom defines
// __k_define( 'COBRA_SITE_LOCK', $cobra['path.htdocs'] . '/nologin' );
__k_define('COBRA_OB', false);
__k_define('COBRA_RECURSIVE_CACHE', true);
// init cobra
__k_init('UTF-8', '__k_exception_handler');
// cache cobra
__k_cache_store(COBRA_MAIN_ID, new coCobra($cobra, $config));
// clean up
unset($__home, $cobra, $config);
Exemplo n.º 2
0
Arquivo: h.php Projeto: hornos/C2
// system paths
$c2['path.home'] = $__home;
$c2['path.lib'] = $__home . '/lib';
$c2['path.app'] = $__home . '/app';
$c2['path.cache'] = $__home . '/cache';
$c2['path.log'] = $__home . '/log';
$c2['path.err'] = $__home . '/err';
$c2['path.htdocs'] = $__home . '/../htdocs';
// system files
$c2['path.h'] = __FILE__;
$c2['path.k'] = $__home . '/k.php';
$c2['path.c'] = $__home . '/se.php';
// load kernel
if (!is_readable($c2['path.k'])) {
    die(__FILE__ . '::' . $c2['path.k']);
}
// else
require_once $c2['path.k'];
// load config
if (!is_readable($c2['path.c'])) {
    die(__FILE__ . '::' . $c2['path.c']);
}
// else
require_once $c2['path.c'];
// custom defines
__k_def('C2_OB', true);
__k_def('C2_SYS_ERR', true);
__k_init('UTF-8', '__k_exc');
__k_store("c2", new c2($c2, $cfg));
// clean up
unset($__home, $c2, $cfg);