PHP Classes

File: examples/includes/bootstrap.php

Recommend this page to a friend!
  Classes of Oliver Lillie   PHP Video Toolkit   examples/includes/bootstrap.php   Download  
File: examples/includes/bootstrap.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Video Toolkit
Manipulate and convert videos with ffmpeg program
Author: By
Last change: added a poor mans cacher
disabled error reporting in cli and added debug backtrace to errors
Date: 1 year ago
Size: 886 bytes
 

Contents

Class file image Download
<?php

    ini_set
('error_reporting', '1');
   
ini_set('track_errors', '1');
   
ini_set('display_errors', '1');
   
ini_set('display_startup_errors', '1');

// define the error callback
   
function __errorHandler()
    {
        if(
error_reporting() === 0)
        {
            return;
        }
       
$args = func_get_args();
       
$count = func_num_args();
        \
PHPVideoToolkit\Trace::vars('ERROR---------', $count === 1 ? 'exception' : 'error', $args, debug_backtrace());
    }
   
set_error_handler('__errorHandler');
   
set_exception_handler('__errorHandler');
   
   
$basedir = dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR;
   
define('BASE', $basedir);
 
    if(
is_file(BASE.'vendor/autoload.php')) require_once BASE.'vendor/autoload.php';
   
    require_once
BASE.'autoloader.php';
    require_once
BASE.'examples/includes/config.php';