$content = gzencode( file_get_contents($fn) , 9);
header('Content-Encoding: gzip');
- header('Vary: Accept-Encoding');
-
+ header('Vary: Accept-Encoding');
header('Content-Length: '. strlen($content));
echo $content;
die('invalid');
}
-
+ static function getCompileDir($type)
+ {
+ switch($type) {
+ case 'js':
+ $suffix = 'jscompile';
+ break;
+ case 'css':
+ $suffix = 'csscompile';
+ break;
+ case 'template':
+ break;
+ default:
+ return false;
+ }
+
+ exit;
+
+ $ui = posix_getpwuid(posix_geteuid());
+
+ $ff = HTML_FlexyFramework::get();
+
+ $compile_dir = session_save_path() . '/' . implode("-", array(
+ $ui['name'],
+ $ff->project,
+ $ff->version,
+ "{$type}compile"
+ ));
+
+ if (file_exists($compile_dir)) {
+ return $compile_dir;
+ }
+
+ if(mkdir($compile_dir, 0700, true)) {
+ return $compile_dir;
+ }
+
+ return false;
+ }
}