PHP code example of black-lamp / blcms-error-handler

1. Go to this page and download the library: Download black-lamp/blcms-error-handler 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/ */

    

black-lamp / blcms-error-handler example snippets


'modules' => [
        'error' => [
            'class' => bl\cms\error\Module::className(),
            'webmasterEmail' => '[email protected]',
            'sendMailAutomatically' => true,
            'enableUserMessageSending' => false
        ],
],
'components' => [
        'errorHandler' => [
            'errorAction' => '/error/error/index',
        ],
        
        'errorHandler' => [
                    'errorAction' => '/error/error/index',
                ],
        
                'errorMailer' => [
                    'class' => yii\swiftmailer\Mailer::className(),
                    'useFileTransport' => false,
                    'messageConfig' => [
                        'charset' => 'UTF-8',
                    ],
                    'transport' => [
                        'class' => 'Swift_SmtpTransport',
                        'username' => $params['webmasterEmail'],
                        'password' => $params['webmasterEmailPassword'],
                        'host' => $params['emailHost'],
                        'port' => $params['emailPort'],
                        'encryption' => 'ssl', // if it is need
                    ],
                ],
]