SW/assets/php/config.php

55 lines
1.5 KiB
PHP
Raw Normal View History

2021-04-26 22:40:34 +02:00
<?php
2021-04-28 21:06:53 +02:00
/**
* Connection parameters to the DB.
*/
2021-05-11 17:36:06 +02:00
define('BD_HOST', 'localhost');
2021-04-28 21:06:53 +02:00
define('BD_NAME', 'complucine');
2021-05-11 17:36:06 +02:00
define('BD_USER', 'sw');
define('BD_PASS', '_admin_');
2021-04-28 21:06:53 +02:00
2021-05-06 10:40:56 +02:00
/*
* Configuration parameters used to generate URLs and file paths in the application
*/
define('ROUTE_APP', '/'); //Change if it´s necessary.
2021-05-11 10:19:02 +02:00
define('RAIZ_APP', __DIR__);
2021-05-06 10:40:56 +02:00
2021-05-04 22:26:24 +02:00
/**
2021-05-06 10:40:56 +02:00
* Image files directory.
*/
2021-05-11 10:20:21 +02:00
define('FILMS_DIR', dirname(RAIZ_APP).'img/films/tmp');
define('FILMS_DIR_PROTECTED', RAIZ_APP.'img/films/tmp');
2021-05-04 22:26:24 +02:00
2021-04-28 21:06:53 +02:00
/**
* Utf-8 support settings, location (language and country) and time zone.
*/
ini_set('default_charset', 'UTF-8');
setLocale(LC_ALL, 'es_ES.UTF.8');
date_default_timezone_set('Europe/Madrid');
2021-04-26 22:40:34 +02:00
//Start session:
session_start();
//HTML template:
require_once('template.php');
$template = new Template();
$prefix = $template->get_prefix();
2021-05-08 15:17:51 +02:00
/**
* Initialize the application:
*/
require_once('aplication.php');
$app = Aplicacion::getSingleton();
$app->init(array('host'=>BD_HOST, 'bd'=>BD_NAME, 'user'=>BD_USER, 'pass'=>BD_PASS));
/**
* @see http://php.net/manual/en/function.register-shutdown-function.php
* @see http://php.net/manual/en/language.types.callable.php
*/
register_shutdown_function(array($app, 'shutdown'));
2021-05-12 10:40:22 +02:00
//Depuración (BORRAR):
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
2021-05-06 10:42:30 +02:00
?>