*/
i18n::$lang = 'sv-se';
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => '/', 'index_file' => '', 'profiling' => IN_DEVELOPMENT, 'caching' => !IN_DEVELOPMENT));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Kohana_Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('database' => MODPATH . 'database', 'sprig' => MODPATH . 'sprig', 'sprig-auth' => MODPATH . 'sprig-auth', 'auth' => MODPATH . 'auth', 'userguide' => MODPATH . 'userguide', 'koxtend' => MODPATH . 'koxtend', 'kotwig' => MODPATH . 'kotwig', 'e-mail' => MODPATH . 'kohana-email'));
// Attach verbose writer
Kohana::$log->attach(new Log_File_Exception(APPPATH . 'logs'), (array) Kohana::ERROR);
/**
示例#2
0
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - integer  cache_life  lifetime, in seconds, of items cached              60
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 * - boolean  expose      set the X-Powered-By header                        FALSE
 */
Kohana::init(array('base_url' => '/kohana/'));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
Cookie::$salt = 'vFkdZeP74127asfNT';
// Please don't change this option at the work site
Cookie::$expiration = 1209600;
// 1209600 - 2 weeks
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
示例#3
0
}
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 * - boolean  autolocale  enable or disable autodetect locale                TRUE
 */
Kohana::init(array('base_url' => '/', 'index_file' => FALSE, 'caching' => Kohana::$environment === Kohana::PRODUCTION, 'profile' => Kohana::$environment !== Kohana::PRODUCTION));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
/**
 * Enable modules.
 *
 * Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('user' => MODPATH . 'user', 'database' => MODPATH . 'database', 'image' => MODPATH . 'image', 'captcha' => MODPATH . 'captcha', 'minion' => MODPATH . 'minion'));
/**
 * Attach the file write to logging.
 * Multiple writers are supported.
 */
if (Kohana::$environment !== Kohana::DEVELOPMENT and Kohana::$environment !== Kohana::STAGING) {
示例#4
0
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - integer  cache_life  lifetime, in seconds, of items cached              60
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 * - boolean  expose      set the X-Powered-By header                        FALSE
 */
if (in_array(@$_SERVER['SERVER_NAME'], array('127.0.0.1', 'fe80::1', '::1', 'localhost', '192.168.2.164', '192.168.0.123'))) {
    $init = array('base_url' => "/tizzy", 'index_file' => "index.php", 'errors' => TRUE, 'profile' => Kohana::$environment === Kohana::DEVELOPMENT);
    Kohana::$environment = Kohana::DEVELOPMENT;
} else {
    $init = array('base_url' => "/", 'index_file' => FALSE, 'errors' => TRUE, 'profile' => Kohana::$environment === Kohana::PRODUCTION);
    Kohana::$environment = Kohana::PRODUCTION;
}
Kohana::init($init);
/**
 * Setting Cookie::$salt
 */
Cookie::$salt = '29961408e9a1bbbf0456dd913a12d31fffa587cc';
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
示例#5
0
    Kohana::$environment = $_ENV['KOHANA_ENV'];
}
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => '/', 'index_file' => FALSE, 'errors' => FALSE));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Kohana_Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Kohana_Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('api' => MODPATH . 'api', 'auth' => MODPATH . 'auth', 'cache' => MODPATH . 'cache', 'censor' => MODPATH . 'censor', 'database' => MODPATH . 'database', 'email' => MODPATH . 'email', 'error' => MODPATH . 'error', 'ftp' => MODPATH . 'ftp', 'googlechart' => MODPATH . 'googlechart', 'image' => MODPATH . 'image', 'key' => MODPATH . 'key', 'message' => MODPATH . 'message', 'orm' => MODPATH . 'orm', 'pagination' => MODPATH . 'pagination', 'reel' => MODPATH . 'reel', 'widget' => MODPATH . 'widget'));
/**
 * Set the routes. Each route must have a minimum of a name, a URI and a set of
 * defaults for the URI.
示例#6
0
    }
}
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => '/', 'errors' => TRUE, 'profile' => Kohana::$environment === Kohana::DEVELOPMENT, 'caching' => Kohana::$environment === Kohana::PRODUCTION));
/**
 * Define error levels = array of messages levels to write OR max level to write
 */
//Kohana::$log->attach(new Log_File(APPPATH.'logs'));
if (Kohana::$environment !== Kohana::DEVELOPMENT and Kohana::$environment !== Kohana::STAGING) {
    //$LEVELS = array();
    $LEVELS = array(LOG_ERR);
} else {
    $LEVELS = array(LOG_INFO, LOG_ERR, LOG_DEBUG);
}
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'), $LEVELS);
/**
示例#7
0
<?php

defined('SYSPATH') or die('No direct script access.');
require "functions.php";
require SYSPATH . 'classes/Kohana/Core' . EXT;
if (is_file(APPPATH . 'classes/Kohana' . EXT)) {
    require APPPATH . 'classes/Kohana' . EXT;
} else {
    require SYSPATH . 'classes/Kohana' . EXT;
}
date_default_timezone_set('Europe/Moscow');
setlocale(LC_ALL, 'en_US.utf-8');
spl_autoload_register(['Kohana', 'auto_load']);
ini_set('unserialize_callback_func', 'spl_autoload_call');
mb_substitute_character('none');
I18n::lang('en-us');
if (isset($_SERVER['SERVER_PROTOCOL'])) {
    HTTP::$protocol = $_SERVER['SERVER_PROTOCOL'];
}
Kohana::$environment = Kohana::PRODUCTION;
Kohana::init(['base_url' => '/', 'index_file' => false, 'errors' => true]);
$composerAutoload = COMPOSERPATH . 'vendor/autoload.php';
require_once "{$composerAutoload}";
\Zver\FileCache::setDirectory(APPPATH . 'cache' . DIRECTORY_SEPARATOR);
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
Kohana::$config->attach(new Config_File());
Kohana::modules(['auth' => MODPATH . 'auth', 'database' => MODPATH . 'database', 'image' => MODPATH . 'image', 'orm' => MODPATH . 'orm', 'admin' => MODPATH . 'admin', 'yandexmap' => MODPATH . 'yandexmap', 'minion' => MODPATH . 'minion', 'captcha' => MODPATH . 'captcha', 'pagination' => MODPATH . 'pagination']);
include_once 'routes.php';
ini_set('unserialize_callback_func', 'spl_autoload_call');
//-- Configuration and initialization -----------------------------------------
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => '/web/'));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Kohana_Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Kohana_Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('swiftriverapihook' => MODPATH . 'swiftriverlocalapihook', 'riverid' => MODPATH . 'riverid', 'swiftrivertheming' => MODPATH . 'swiftrivertheming'));
/**
 * Set the routes. Each route must have a minimum of a name, a URI and a set of
 * defaults for the URI.
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
//this is a convention that eases things for us, but doesn't break interoperability of the mop modules
$path = substr($_SERVER['SCRIPT_NAME'], 0, -9);
Kohana::init(array('base_url' => $path));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('lattice' => 'lattice/lattice', 'latticeauth' => 'lattice/latticeauth', 'latticecore' => 'lattice/latticecore', 'latticejs' => 'lattice/latticejs', 'latticeui' => 'lattice/latticeui', 'latticeextras' => 'lattice/latticeextras', 'testbed' => 'lattice/testbed', 'latticeviews' => 'lattice/latticeviews', 'navigation' => 'lattice/navigation', 'usermanagement' => 'lattice/usermanagement', 'latticeviews' => 'lattice/latticeviews', 'auth' => MODPATH . 'auth', 'database' => MODPATH . 'database', 'image' => MODPATH . 'image', 'orm' => MODPATH . 'orm'));
//check for setup
Lattice_Initializer::check(array('rootgraph', 'lattice', 'cms', 'latticecms', 'latticeauth', 'latticetests', 'usermanagement', 'testing', 'defaultusers'));
/**
示例#10
0
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - integer  cache_life  lifetime, in seconds, of items cached              60
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 * - boolean  expose      set the X-Powered-By header                        FALSE
 */
Kohana::init(array('base_url' => 'http://localhost:4000/', 'index_file' => false));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('auth' => MODPATH . 'auth', 'database' => MODPATH . 'database', 'orm' => MODPATH . 'orm'));
/**
 * Cookie Salt
 * @see  http://kohanaframework.org/3.3/guide/kohana/cookies
示例#11
0
ini_set('unserialize_callback_func', 'spl_autoload_call');
//-- Configuration and initialization -----------------------------------------
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => BASE_URL, 'index_file' => INDEX_FILE, 'errors' => !IN_PRODUCTION, 'profile' => !IN_PRODUCTION, 'caching' => IN_PRODUCTION));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
$log_levels = preg_split("/,/", LOG_LVL);
Kohana::$log->attach(new Kohana_Log_File(APPPATH . 'site_logs'), $log_levels);
Kohana::$log->attach(new Kohana_Log_File(APPPATH . 'access_logs'), array('ACCESS'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 * Attach a file reader to profile-specific config directory.
 */
Kohana::$config->attach(new Kohana_Config_File());
Kohana::$config->attach(new Kohana_Config_File(CONF_DIR), TRUE);
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
示例#12
0
    Kohana::$environment = $_ENV['KOHANA_ENV'];
}
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => '/library/', 'index_file' => '', 'caching' => TRUE));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Kohana_Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Kohana_Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('cache' => MODPATH . 'cache', 'database' => MODPATH . 'database', 'orm' => MODPATH . 'orm'));
/**
 * Set the routes. Each route must have a minimum of a name, a URI and a set of
 * defaults for the URI.
示例#13
0
    Kohana::$environment = constant('Kohana::' . strtoupper($_SERVER['KOHANA_ENV']));
}
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => 'http://kodelearn.kp/', 'index.php' => ''));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('auth' => MODPATH . 'auth', 'database' => MODPATH . 'database', 'image' => MODPATH . 'image', 'orm' => MODPATH . 'orm', 'unittest' => MODPATH . 'unittest', 'stickyform' => MODPATH . 'stickyform', 'breadcrumbs' => MODPATH . 'breadcrumbs', 'playground' => MODPATH . 'playground', 'sort' => MODPATH . 'sort', 'dynamicmenu' => MODPATH . 'dynamicmenu', 'pagination' => MODPATH . 'pagination', 'cacheimage' => MODPATH . 'cacheimage', 'purifier' => MODPATH . 'purifier', 'eventdispatch' => MODPATH . 'eventdispatch', 'email' => MODPATH . 'email', 'notice' => MODPATH . 'notice', 'exam' => MODPATH . 'exam', 'event' => MODPATH . 'event', 'calendar' => MODPATH . 'calendar', 'lecture' => MODPATH . 'lecture', 'attendance' => MODPATH . 'attendance', 'feed' => MODPATH . 'feed', 'post' => MODPATH . 'post', 'document' => MODPATH . 'document', 'assignment' => MODPATH . 'assignment', 'exercise' => MODPATH . 'exercise', 'lesson' => MODPATH . 'lesson', 'flashcard' => MODPATH . 'flashcard', 'question' => MODPATH . 'question', 'link' => MODPATH . 'link', 'video' => MODPATH . 'video'));
/**
 * Set the routes. Each route must have a minimum of a name, a URI and a set of
 * defaults for the URI.
示例#14
0
ini_set('unserialize_callback_func', 'spl_autoload_call');
//-- Configuration and initialization -----------------------------------------
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => WEB_ROOT, 'index_file' => false, 'profile' => !IN_PRODUCTION, 'caching' => IN_PRODUCTION));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Kohana_Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Kohana_Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('auth' => MODPATH . 'auth', 'database' => MODPATH . 'database', 'orm' => MODPATH . 'orm', 'pagination' => MODPATH . 'pagination', 'migrations' => MODPATH . 'migrations', 'message' => MODPATH . 'message'));
# Shortcuts for user actions
Route::set('login', 'login')->defaults(array('controller' => 'user', 'action' => 'login'));
Route::set('logout', 'logout')->defaults(array('controller' => 'user', 'action' => 'logout'));
示例#15
0
文件: index.php 项目: ascseb/kohana
 * @see  http://docs.kohanaphp.com/bootstrap
 *
 * ----------------------------------------------------------------------------
 */
// Define the name of the front controller index
define('FCINDEX', basename(__FILE__));
// Define the absolute paths for configured directories
define('DOCROOT', str_replace('\\', '/', realpath(getcwd())) . '/');
define('APPPATH', str_replace('\\', '/', realpath($application)) . '/');
define('MODPATH', str_replace('\\', '/', realpath($modules)) . '/');
define('SYSPATH', str_replace('\\', '/', realpath($system)) . '/');
// Clean up the configuration vars
unset($application, $modules, $system);
if (file_exists('install' . EXT)) {
    // Load the installation check
    return include 'install' . EXT;
}
// Load the main Kohana class
require SYSPATH . 'classes/kohana' . EXT;
// Enable auto-loading of classes
spl_autoload_register(array('Kohana', 'auto_load'));
// Enable the exception handler
// set_exception_handler(array('Kohana', 'exception_handler'));
// Enable the error-to-exception handler
set_error_handler(array('Kohana', 'error_handler'));
// Initialize the environment
Kohana::init();
// Create the main instance
Kohana::instance();
// Shutdown the environment
Kohana::shutdown();
示例#16
0
文件: bootstrap.php 项目: stecj/sime
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - integer  cache_life  lifetime, in seconds, of items cached              60
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 * - boolean  expose      set the X-Powered-By header                        FALSE
 */
Kohana::init(array('base_url' => '/serhas', 'index_file' => 'index.php'));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('database' => MODPATH . 'database', 'orm' => MODPATH . 'orm', 'userguide' => MODPATH . 'userguide'));
/**
 * Set the routes. Each route must have a minimum of a name, a URI and a set of
 * defaults for the URI.
示例#17
0
 * ------------------------------------------------------------
 */
// Replace the default protocol
if (isset($_SERVER['SERVER_PROTOCOL'])) {
    HTTP::$protocol = $_SERVER['SERVER_PROTOCOL'];
}
// Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
if (isset($_SERVER['KOHANA_ENV'])) {
    Kohana::$environment = constant('Kohana::' . strtoupper($_SERVER['KOHANA_ENV']));
}
/*
 * ------------------------------------------------------------
 * Initialize Core, setting the default options.
 * ------------------------------------------------------------
 */
Kohana::init(array('base_url' => '/', 'index_file' => false, 'cache_dir' => APPPATH . 'cache', 'caching' => Kohana::$environment < Kohana::DEVELOPMENT, 'profile' => Kohana::$environment > Kohana::PRODUCTION, 'errors' => true));
/*
 * ------------------------------------------------------------
 * Config
 * ------------------------------------------------------------
 */
// Attach a file reader to config. Multiple readers are supported.
Kohana::$config->attach(new Config_File());
/*
 * ------------------------------------------------------------
 * Configure regional settings
 * ------------------------------------------------------------
 */
// Set default time zone
date_default_timezone_set(Kohana::$config->load('locale.timezone'));
// Set the mb_substitute_character to "none"
示例#18
0
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - integer  cache_life  lifetime, in seconds, of items cached              60
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 * - boolean  expose      set the X-Powered-By header                        FALSE
 */
Kohana::init(array('base_url' => '/admin/'));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
Cookie::$salt = 'sKfklk$poDDw9mnsS092kjkddkkjdskjfhthisissalt!';
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array());
/**
 * Set the routes. Each route must have a minimum of a name, a URI and a set of
示例#19
0
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - integer  cache_life  lifetime, in seconds, of items cached              60
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 * - boolean  expose      set the X-Powered-By header                        FALSE
 */
Kohana::init(array('base_url' => '/dupari.com/', 'index_file' => FALSE));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('auth' => MODPATH . 'auth', 'database' => MODPATH . 'database', 'orm' => MODPATH . 'orm', 'userguide' => MODPATH . 'userguide'));
/**
 * Set the routes. Each route must have a minimum of a name, a URI and a set of
 * defaults for the URI.
示例#20
0
    Kohana::$environment = constant('Kohana::' . strtoupper($_SERVER['KOHANA_ENV']));
}
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => dirname($_SERVER['SCRIPT_NAME']), 'index_file' => file_exists('.htaccess') ? '' : basename($_SERVER['SCRIPT_NAME']), 'profile' => Kohana::$environment !== Kohana::PRODUCTION, 'caching' => Kohana::$environment === Kohana::PRODUCTION));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File('logs'));
#Kohana::$log->add(Log::INFO, 'someone just click the east egg!');
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
Kohana::$config->load('ecmproject');
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
$modules = array('database' => MODPATH . 'database', 'orm' => MODPATH . 'orm', 'pagination' => MODPATH . 'pagination', 'static' => MODPATH . 'static', 'log' => MODPATH . 'log', 'email' => MODPATH . 'email');
if (file_exists(MODPATH . 'debug-toolbar')) {
示例#21
0
    Kohana::$environment = constant('Kohana::' . strtoupper($_SERVER['KOHANA_ENV']));
}
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => 'http://dev.vm/blog/'));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('database' => MODPATH . 'database'));
/**
 * Set the routes. Each route must have a minimum of a name, a URI and a set of
 * defaults for the URI.
示例#22
0
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - integer  cache_life  lifetime, in seconds, of items cached              60
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 * - boolean  expose      set the X-Powered-By header                        FALSE
 */
Kohana::init(array('errors' => true, 'base_url' => '/', 'index_file' => false));
Cookie::$salt = 'asdahsdfzfcsEERfAf';
Cookie::$httponly = TRUE;
Cookie::$expiration = Date::WEEK;
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('oauth' => MODPATH . 'oauth', 'cache' => MODPATH . 'cache', 'database' => MODPATH . 'database', 'image' => MODPATH . 'image', 'minion' => MODPATH . 'minion', 'orm' => MODPATH . 'orm', 'unittest' => MODPATH . 'unittest'));
示例#23
0
ini_set('unserialize_callback_func', 'spl_autoload_call');
//-- Configuration and initialization -----------------------------------------
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']), 'index_file' => '', 'profiling' => !IN_PRODUCTION, 'caching' => IN_PRODUCTION));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Kohana_Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Kohana_Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('forum' => MODPATH . 'forum', 'message' => MODPATH . 'message', 'facebook' => MODPATH . 'facebook', 'modulargaming' => MODPATH . 'modulargaming', 'event' => MODPATH . 'event', 'jelly' => MODPATH . 'jelly', 'sprig' => MODPATH . 'sprig', 'database' => MODPATH . 'database', 'a1' => MODPATH . 'A1', 'a2' => MODPATH . 'A2', 'acl' => MODPATH . 'ACL', 'pagination' => MODPATH . 'pagination', 'captcha' => MODPATH . 'captcha', 'image' => MODPATH . 'image'));
/**
 * Set the routes. Each route must have a minimum of a name, a URI and a set of
 * defaults for the URI.
示例#24
0
文件: bootstrap.php 项目: rhrn/apirn
}
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
# copy config/init.php.default to config/init.php
Kohana::init(include APPPATH . 'config/init.php');
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
/**
 * Cookie config.
 */
$cookie = Kohana::$config->load('cookie');
Cookie::$salt = $cookie->salt;
Cookie::$expiration = $cookie->expiration;
Cookie::$domain = $cookie->domain;
示例#25
0
ini_set('unserialize_callback_func', 'spl_autoload_call');
//-- Configuration and initialization -----------------------------------------
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => '/', 'index_file' => FALSE, 'charset' => 'utf-8'));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Kohana_Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Kohana_Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('database' => MODPATH . 'database', 'image' => MODPATH . 'image', 'orm' => MODPATH . 'orm', 'pagination' => MODPATH . 'pagination'));
/**
 * Set the routes. Each route must have a minimum of a name, a URI and a set of
 * defaults for the URI.
示例#26
0
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - integer  cache_life  lifetime, in seconds, of items cached              60
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 * - boolean  expose      set the X-Powered-By header                        FALSE
 */
Kohana::init(array('base_url' => '/', 'index_file' => '', 'errors' => TRUE, 'charset' => 'utf-8', 'profile' => Kohana::$environment === Kohana::DEVELOPMENT, 'caching' => FALSE));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('auth' => MODPATH . 'auth', 'cache' => MODPATH . 'cache', 'database' => MODPATH . 'database', 'minion' => MODPATH . 'minion', 'orm' => MODPATH . 'orm'));
/**
 * Cookie Salt
 * @see  http://kohanaframework.org/3.3/guide/kohana/cookies
示例#27
0
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - integer  cache_life  lifetime, in seconds, of items cached              60
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 * - boolean  expose      set the X-Powered-By header                        FALSE
 */
Kohana::init(array('base_url' => '/', 'index_file' => '', 'errors' => TRUE, 'profiling' => FALSE));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
// preload configs
Kohana::$config->load('constants');
Kohana::$config->load('app');
Kohana::$config->load('install');
Kohana::$config->load('database');
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
示例#28
0
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
if (IN_PRODUCTION) {
    error_reporting(E_ALL ^ E_NOTICE);
}
Kohana::init(array('base_url' => '/projekt/', 'index_file' => FALSE, 'profile' => !IN_PRODUCTION, 'caching' => IN_PRODUCTION));
I18n::$lang = 'pl-pl';
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Kohana_Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Kohana_Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('patches' => MODPATH . 'patches', 'firephp' => MODPATH . 'firephp', 'database' => MODPATH . 'database', 'jelly' => MODPATH . 'jelly', 'jelly-auth' => MODPATH . 'jelly-auth', 'auth' => MODPATH . 'auth', 'pagination' => MODPATH . 'pagination'));
/**
 * Attach the FirePHP to logging
示例#29
0
spl_autoload_register(array('Kohana', 'auto_load'));
//-- Configuration and initialization -----------------------------------------
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 */
Kohana::init(array('base_url' => '/', 'index_file' => ''));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Kohana_Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Kohana_Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array());
/**
 * Set the routes. Each route must have a minimum of a name, a URI and a set of
 * defaults for the URI.
示例#30
0
/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - integer  cache_life  lifetime, in seconds, of items cached              60
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 * - boolean  expose      set the X-Powered-By header                        FALSE
 */
Kohana::init(array('base_url' => '/', 'caching' => TRUE, 'profile' => FALSE, 'index_file' => FALSE));
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH . 'logs'));
/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File());
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array('auth' => MODPATH . 'auth', 'cache' => MODPATH . 'cache', 'codebench' => MODPATH . 'codebench', 'database' => MODPATH . 'database', 'image' => MODPATH . 'image', 'minion' => MODPATH . 'minion', 'unittest' => MODPATH . 'unittest', 'userguide' => MODPATH . 'userguide', 'cms' => MODPATH . 'cms', 'tbl' => MODPATH . 'tbl', 'tpl' => MODPATH . 'tpl', 'pgn' => MODPATH . 'pgn', 'notice' => MODPATH . 'notice', 'email' => MODPATH . 'email', 'mysqli' => MODPATH . 'mysqli'));
/**
 * Get settings
 */