<?php
use Magento\Framework\App\Bootstrap;

require dirname(dirname(__DIR__)) . '/app/bootstrap.php';

$params = $_SERVER;
$params[Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS] = [
    \Magento\Framework\App\Filesystem\DirectoryList::PUB => [
        \Magento\Framework\App\Filesystem\DirectoryList::URL_PATH => ''
    ],
    \Magento\Framework\App\Filesystem\DirectoryList::MEDIA => [
        \Magento\Framework\App\Filesystem\DirectoryList::URL_PATH => 'media'
    ],
    \Magento\Framework\App\Filesystem\DirectoryList::STATIC_VIEW => [
        \Magento\Framework\App\Filesystem\DirectoryList::URL_PATH => 'static'
    ],
    \Magento\Framework\App\Filesystem\DirectoryList::UPLOAD => [
        \Magento\Framework\App\Filesystem\DirectoryList::URL_PATH => 'media/upload'
    ],
];
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'pl';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';

$bootstrap = Bootstrap::create(BP, $params);
$app = $bootstrap->createApplication(\Magento\Framework\App\Http::class);
$bootstrap->run($app);
