File: web/config.php

Recommend this page to a friend!
  Classes of Slawomir Kaleta  >  Dframe Demo  >  web/config.php  >  Download  
File: web/config.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Dframe Demo
Application to demonstrate the Dframe framework
Author: By
Last change: #20, Fix ini_set
#20, bool value in ini_set
Date: 6 months ago
Size: 1,532 bytes
 

Contents

Class file image Download
<?php
$debugAllowed
= [
   
'127.0.0.1',
   
'::1',
];

// DEBUG configuration
if (isset($_SERVER['REMOTE_ADDR']) and in_array($_SERVER['REMOTE_ADDR'], $debugAllowed)) {
   
ini_set('display_errors', "1"); // Debug setings
   
error_reporting(E_ALL); // Debug setings
   
define('MOD_REWRITE', true); // Mod rewrite (ex. task=page&action=login -> page/login )
   
define('setErrorLog', true); // DB show error
} else {
   
ini_set('display_errors', "0"); // Debug setings
   
error_reporting(E_ALL); // Debug setings
   
define('MOD_REWRITE', true); // Mod rewrite (ex. task=page&action=login -> page/login )
   
define('setErrorLog', false); // DB show error
}

// Application configuration
define('APP_NAME', "dframe_demo"); // Project Name
define('APP_DIR', __DIR__ . '/../app/');
define('CODING_STYLE', true); // Check PSR-2: Coding Style

// Website configuration
define('VERSION', "Dframe"); // Version aplication
define('SALT', "YOURSALT123"); // SALT default: YOURSALT123


if (isset($_SERVER['REMOTE_ADDR']) and ($_SERVER['REMOTE_ADDR'] == '127.0.0.1' or $_SERVER['REMOTE_ADDR'] == '::1')) {
   
define('HTTP_HOST', $_SERVER['HTTP_HOST'] . '/Dframe-demo'); // Dev
} else {
   
define('HTTP_HOST', 'website.url'); // Production
}

// Database configuration
define('DB_HOST', ""); // Database Host (localhost)
define('DB_USER', "root"); // Database Username
define('DB_PASS', ""); // Database Password
define('DB_DATABASE', "dframe_demo"); // Databese Name


For more information send a message to info at phpclasses dot org.