PHP - compress static css file with GZIP
问题 so I have a css file, style.css. in the same directory I have the images/ folder. How can I make a script that compresses style.css, but from another folder? Right now I have this: <?php if(isset($_GET['css'])) $file = array('url' => htmlspecialchars($_GET['css']), 'type' => 'text/css'); if(isset($_GET['js'])) $file = array('url' => htmlspecialchars($_GET['js']), 'type' => 'application/javascript'); if(!isset($file)) exit(); header('Content-type: '.$file['type']); header('Cache-Control: max