PHP Classes

File: app/config/environment.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   PHP IP Logger   app/config/environment.php   Download  
File: app/config/environment.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP IP Logger
Track user IP addresses that access certain pages
Author: By
Last change:
Date: 1 year ago
Size: 857 bytes
 

Contents

Class file image Download
<?php

define
('ENVIRONMENT', 'development');
ini_set("memory_limit", "1024M");

switch (
ENVIRONMENT) {
    case
'development':
       
error_reporting(E_ALL);
       
ini_set("display_errors", 1);
        break;
    case
'testing':
    case
'production':
       
ini_set('display_errors', 0);
       
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
        break;
    case
'installation':
       
$url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
       
$c = (strpos($url, 'install.php'));
        if (
$c == false) {
           
header('Location: ' . SITE_URL . '/install.php');
            exit;
        }
        break;
    default:
       
header("HTTP/1.1 503 Service Unavailable.", true, 503);
        echo
"The application environment is not set correctly";
        exit;
        break;
}