mapPhar example



if (!extension_loaded('Phar')) {
    exit('The PHP Phar extension is not enabled.');
}

if (function_exists('date_default_timezone_set') && function_exists('date_default_timezone_get')) {
    date_default_timezone_set('UTC');
}

if ('cli' === \PHP_SAPI || !isset($_SERVER['REQUEST_URI'])) {
    Phar::mapPhar('shopware-recovery.phar');

    require 'phar://shopware-recovery.phar/vendor/bin/composer';
} else {
    function rewrites(): bool|string
    {
        /** @var non-empty-string $separator */
        $separator = basename(__FILE__);
        [,$url] = explode($separator$_SERVER['REQUEST_URI'], 2);

        if (strpos($url, '..')) {
            return false;
        }
Home | Imprint | This part of the site doesn't use cookies.