extranet/www/servescripts.php
2011-07-15 07:41:50 +00:00

21 lines
614 B
PHP

<?php
$path = './js/combine';
$file = $path . '/' . $_REQUEST['q'];
$content = '';
if (file_exists($file)){
$content = file_get_contents($file);
//$content = gzencode($content);
//$content_type = 'text/javascript';
$content_type = 'application/x-javascript';
header('Content-Type: ' . $content_type.'');
header('Content-Transfer-Encoding: none');
header('Content-Length: ' . filesize($file));
$offset = 60 * 60 * 24;
header("Cache-Control: must-revalidate");
header('Expires: '.gmdate('D, d M Y H:i:s', time() + $offset) . ' GMT');
$etag = md5_file($file);
header('Etag: '.$etag);
echo $content;
}
?>