Ejemplo n.º 1
0
        $out .= '//This lib: ' . $this->getPageUrl() . PHP_EOL . PHP_EOL;
        if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $_SERVER['HTTP_IF_MODIFIED_SINCE']) {
            $browserCache = strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']);
            if ($browserCache >= $this->getLastModifiedDate($includes)) {
                header('HTTP/1.1 304 Not Modified');
                exit;
            }
        }
        header('Last-modified: ' . date('r', $this->getLastModifiedDate($includes)));
        $compression = $this->getVar('compression', $config['compression']);
        foreach ($includes as $include) {
            $out .= $this->getScriptFile($include, $compression);
        }
        if (in_array('Depender.Client', $includes) || $this->getVar('client')) {
            $out .= $this->dependerJs($includes);
        }
        print $out;
    }
}
date_default_timezone_set('UTC');
if (!file_exists('cache')) {
    mkdir('cache');
}
$depender = new Depender();
if ($depender->getVar('require') || $depender->getVar('requireLibs') || $depender->getVar('client')) {
    $depender->build();
} else {
    if ($depender->getVar('reset')) {
        $depender->deleteCache('flat');
    }
}