PHP Classes

File: core/config.php

Recommend this page to a friend!
  Packages of Alvaro Talavera   PHP Light MVC   core/config.php   Download  
File: core/config.php
Role: Configuration script
Content type: text/plain
Description: Configuration script
Class: PHP Light MVC
MVC framework to implement PHP Web applications
Author: By
Last change:
Date: 3 months ago
Size: 860 bytes
 

Contents

Class file image Download
<?
ini_set
('display_errors', 1);
ini_set("session.gc_maxlifetime", "3600");

error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED);

date_default_timezone_set('UTC');

# Datos del Sitio

define('DOMAIN', getenv('DOMAIN') ?: 'localhost');
define('SITE_NAME', 'PhpLightMVC example');
define('WWW_PATH', getenv('APP_URL') ?: 'http://' . DOMAIN);

# DB Mysql
define('MY_DB_USER', getenv('DB_USERNAME'));
define('MY_DB_PASS', getenv('DB_PASSWORD'));
define('MY_DB_SERVER', getenv('DB_HOST'));
define('MY_DB_NAME', getenv('DB_DATABASE'));

# Email
define('SMTP_HOST', getenv('SMTP_HOST'));
define('SMTP_PORT', getenv('SMTP_PORT'));


# Security Vault
define('SECURITY_VAULT', getenv('SECURITY_VAULT'));

if (!
SECURITY_VAULT) {
    die(
'SECURITY_VAULT not defined in .env');
}

# Session
define('_SESSION_NAME', (md5(SECURITY_VAULT) . '___session_name_'));

?>