Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ## INDEX
- define('QD_VERSION', '5.0');
- define('QD_INTERNAL_VERSION', '5.0');
- define('QD_TIME', microtime(true));
- //paths
- define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application/')); //quick hack for webroot but system is in a submap...
- define('PHP_INT_MIN', (int)(PHP_INT_MAX+1));
- // Ensure library/ is on include_path
- set_include_path(implode(PATH_SEPARATOR, array(
- realpath(APPLICATION_PATH . '/../library'),
- get_include_path(),
- )));
- require_once 'Zend/Application.php';
- require_once("QD/QD.php");
- # QD/QD.php
- // At this function the app gives an error (init the real zend_application)
- public static function init($sMode) {
- // Create application, bootstrap, and run
- self::$_app = new Zend_Application(
- $sMode,
- APPLICATION_PATH . '/application.ini'
- );
- Zend_Loader_Autoloader::getInstance()->registerNamespace("QD");
- self::$_enviroment = $sMode;
- }
- # Bootstrap.php #
- <?php
- class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
- {
- protected function _initDatabase(){
- $this->bootstrap('db');
- }
- protected function _initTimezone(){
- date_default_timezone_set('Europe/Amsterdam');
- }
- protected function _initAutoload() {
- $autoloader = new Zend_Application_Module_Autoloader(array(
- 'namespace' => '',
- 'basePath' => dirname(__FILE__),
- ));
- return $autoloader;
- }
- protected function _initSession(){
- session_start();
- }
- }
- # Application.ini #
- [production]
- phpSettings.display_startup_errors = 0
- phpSettings.display_errors = 0
- phpSettings.date.timezone = "CET"
- bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
- resources.frontController.params.displayExceptions = 0
- resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
- resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
- resources.layout.layoutPath = APPLICATION_PATH "/layouts/default"
- resources.locale.default = "en_EN"
- resources.db.adapter = PDO_MYSQL
- resources.db.params.host = localhost
- resources.db.params.username = *
- resources.db.params.password = *
- resources.db.params.dbname = *
- resources.modules = ""
- website.url = "beatproviders.eu"
- website.title = "Beat Providers - DJs & Producers - Official Website"
Add Comment
Please, Sign In to add comment