env; header('Content-Type: text/html;charset=utf-8'); function h($str) { return htmlspecialchars($str, ENT_QUOTES); } function getInput($name, $default = '', $size = 50) { global $env; $val = $env->post($name, $default); return ""; } $defaultCurrentDir = __DIR__; $defaultDocRoot = realpath($env->getDocRoot()); $defaultSymLink = '//symlinkPath'; $defaultSymTarget = ($defaultCurrentDir[0] === '/') ? '/tmp' : 'C:\\WINDOWS\\Temp'; $defaultCss = "url(hello.gif)\nurl(../hello.gif)\nurl(../../hello.gif)\nurl(up/hello.gif)"; $out = ''; if ($env->post('css')) { $symlinks = array(); if ('' !== ($target = $env->post('symTarget'))) { $symlinks[$env->post('symLink')] = $target; } $css = Minify_CSS_UriRewriter::rewrite( $env->post('css'), $env->post('currentDir'), $env->post('docRoot'), $symlinks ); $out = "
" . h($css) . '
'; } ?>

Test Minify_CSS_UriRewriter::rewrite()

Warning! Please do not place this application on a public site. This should be used only for testing.