Skip to content

Instantly share code, notes, and snippets.

@dragoonis
Created June 11, 2011 19:10
Show Gist options
  • Save dragoonis/1020850 to your computer and use it in GitHub Desktop.
Save dragoonis/1020850 to your computer and use it in GitHub Desktop.
<?php
$modules = isset($_GET['mod']) ? explode(',', str_replace('../', '', $_GET['mod'])) : array();
$css = '';
foreach($modules as $module) {
if(file_exists("{$module}.css")) {
$css .= "/* ---- {$module}.css ---- */ \n\n" . file_get_contents($module . '.css') . "\n\n";
}
}
if($css !== '') {
header('Content-type: text/css');
echo $css;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment