Esempio n. 1
0
function open_nitro()
{
    if (session_id()) {
        if (isset($_SESSION['nitro_ftp_persistence'])) {
            unset($_SESSION['nitro_ftp_persistence']);
        }
        if (isset($_SESSION['nitro_persistence'])) {
            unset($_SESSION['nitro_persistence']);
        }
    }
    if (isset($_POST['cacheFileToClear']) && count($_POST) == 1) {
        if (file_exists(NITRO_PAGECACHE_FOLDER . $_POST['cacheFileToClear'])) {
            unlink(NITRO_PAGECACHE_FOLDER . $_POST['cacheFileToClear']);
        }
        pageRefresh();
    }
    if (isNitroEnabled()) {
        applyCloudFlareFix();
        serveCacheIfNecessary();
    }
    $GLOBALS['nitro.start.time'] = microtime(true);
    ob_start();
    // Start the output buffer
}
Esempio n. 2
0
File: top.php Progetto: BulatSa/Ctex
        }
        /*
        if (!extension_loaded('zlib') || ini_get('zlib.output_compression')) {
        	return false;
        }
        */
        if (headers_sent()) {
            return false;
        }
        if (connection_status()) {
            return false;
        }
        header('Content-Encoding: ' . $encoding);
        return true;
    }
    return false;
}
if (isset($_POST['cacheFileToClear'])) {
    if (file_exists(NITRO_PAGECACHE_FOLDER . $_POST['cacheFileToClear'])) {
        unlink(NITRO_PAGECACHE_FOLDER . $_POST['cacheFileToClear']);
    }
    pageRefresh();
    exit;
}
if ($nitroPersistance['Nitro']['Enabled'] == 'yes') {
    serveCacheIfNecessary();
    serveBrowserCacheHeadersIfNecessary();
}
$startTime = microtime(true);
ob_start();
// Start the output buffer