SW/assets/php/config.php
2021-05-12 10:40:22 +02:00

55 lines
1.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* Connection parameters to the DB.
*/
define('BD_HOST', 'localhost');
define('BD_NAME', 'complucine');
define('BD_USER', 'sw');
define('BD_PASS', '_admin_');
/*
* Configuration parameters used to generate URLs and file paths in the application
*/
define('ROUTE_APP', '/'); //Change if it´s necessary.
define('RAIZ_APP', __DIR__);
/**
* Image files directory.
*/
define('FILMS_DIR', dirname(RAIZ_APP).'img/films/tmp');
define('FILMS_DIR_PROTECTED', RAIZ_APP.'img/films/tmp');
/**
* 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');
//Start session:
session_start();
//HTML template:
require_once('template.php');
$template = new Template();
$prefix = $template->get_prefix();
/**
* 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'));
//Depuración (BORRAR):
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
?>