PHP Classes

File: error/init_error.php

Recommend this page to a friend!
  Classes of Francisco Núñez   Last Hammer   error/init_error.php   Download  
File: error/init_error.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Last Hammer
Framework to develop after installation
Author: By
Last change:
Date: 3 years ago
Size: 844 bytes
 

Contents

Class file image Download
<?php
try {
    if (
ini_set('session.gc_maxlifetime', '0') === false) {
        throw new
Exception('Unable to set session.gc_maxlifetime.');
    }
    if (
ini_set('session.use_only_cookies', '1') === false) {
        throw new
Exception('Unable to set session.use_only_cookies.');
    }
    if (
ini_set('session.cookie_httponly', '1') === false) {
        throw new
Exception('Unable to set session.cookie_httponly.');
    }
    if (
ini_set('error_reporting', '1') === false) {
        throw new
Exception('Unable to set error_reporting.');
    }
    if (
ini_set('display_errors', '0') === false) {
        throw new
Exception('Unable to set display_errors.');
    }
} catch (
Exception $e) {
    echo
'Exception catch: ', $e->getMessage(), "\n";
}

error_reporting(E_ALL);

require_once
$_SERVER['DOCUMENT_ROOT'] . '/error/handler_error.php';