PHP code example of 4apps / staticphp

1. Go to this page and download the library: Download 4apps/staticphp 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/ */

    

4apps / staticphp example snippets




define('PUBLIC_PATH', __DIR__);


$config['module_paths'] = [
    'site2' => BASE_PATH . '/site2/Modules',
];

$config['autoload_helpers'] = ['Bootstrap', 'staticphp/Utils/Helpers'];
$config['autoload_configs'] = ['App', 'staticphp/Utils/Db'];

$config['error_pages'] = [
    'status' => APP_PATH . '/Views/Errors/status.php',
    'debug'  => null,
];

throw new ErrorMessage(
    message: 'Not Found',
    description: 'That invoice has been archived.',
    httpStatusCode: 404,
    publicDescription: true
);