Ejemplo n.º 1
0
 * advanced ways of loading plugins
 *
 * CakePlugin::loadAll(); // Loads all plugins at once
 * CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit
 *
 */
/**
 * You can attach event listeners to the request lifecyle as Dispatcher Filter . By Default CakePHP bundles two filters:
 *
 * - AssetDispatcher filter will serve your asset files (css, images, js, etc) from your themes and plugins
 * - CacheDispatcher filter will read the Cache.check configure variable and try to serve cached content generated from controllers
 *
 * Feel free to remove or add filters as you see fit for your application. A few examples:
 *
 * Configure::write('Dispatcher.filters', array(
 *		'MyCacheFilter', //  will use MyCacheFilter class from the Routing/Filter package in your app.
 *		'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
 * 		array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
 *		array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
 *
 * ));
 */
Configure::write('Dispatcher.filters', array('AssetDispatcher', 'CacheDispatcher'));
/**
 * Configures default file logging options
 */
App::uses('CakeLog', 'Log');
CakeLog::config('debug', array('engine' => 'FileLog', 'types' => array('notice', 'info', 'debug'), 'file' => 'debug'));
CakeLog::config('error', array('engine' => 'FileLog', 'types' => array('warning', 'error', 'critical', 'alert', 'emergency'), 'file' => 'error'));
load_cluster_config('bootstrap');
Ejemplo n.º 2
0
 * object listings, and translation cache files are stored with this configuration.
 */
Cache::config('_cake_core_', array('engine' => $engine, 'prefix' => $prefix . 'cake_core_', 'path' => CACHE . 'persistent' . DS, 'serialize' => $engine === 'File', 'duration' => $duration));
/**
 * Configure the cache for model and datasource caches.  This cache configuration
 * is used to store schema descriptions, and table listings in connections.
 */
Cache::config('_cake_model_', array('engine' => $engine, 'prefix' => $prefix . 'cake_model_', 'path' => CACHE . 'models' . DS, 'serialize' => $engine === 'File', 'duration' => $duration));
/**
 * 首页新闻板块的缓存
 */
Cache::config('short', array('engine' => 'File', 'duration' => '+2 hours', 'path' => CACHE, 'prefix' => 'short_'));
/**
 * 友情链接等缓存
 */
Cache::config('long', array('engine' => 'File', 'duration' => '+1 week', 'probability' => 100, 'prefix' => 'long_'));
// 根租户ID, 可以帮助管理其他用户
define('ROOT_TENANT_ID', 1);
/**
 * 应用程序全局配置
 */
Configure::write('Config.language', 'chi');
Configure::write('SessionKey', 'ActiveUser');
Configure::write('App.name', '易玥软件授权系统');
Configure::write('App.company', '易科技网络技术有限公司');
// Load Environment Dependent config files
Configure::load('clusters');
Configure::load('misc');
require_once APP . 'Config' . DS . 'basics.php';
load_cluster_config('core');