PHP code example of bitweb / error-reporting

1. Go to this page and download the library: Download bitweb/error-reporting library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bitweb / error-reporting example snippets


$errorService = new \BitWeb\ErrorReporting\Service\ErrorService(array(
    'errorReportingLevel' => E_ALL,
    'subject' => '[Errors][your-app-id-here]',
    'emails' => array (
        '[email protected]'
    ),
    'from_address' => '[email protected]',
    'ignore404' => false,
    'ignoreBot404' => false,
    'botList' => array(
        'AhrefsBot',
        'bingbot',
        'Ezooms',
        'Googlebot',
        'Mail.RU_Bot',
        'YandexBot',
    ),
    'ignorableExceptions' => array(
        'ErrorException'
    ),
    'ignorablePaths' => array (
        'paths/to/ignore'
    )
));
$errorService->startErrorHandling();

$errorService->endErrorHandling();