PHP Classes

File: sample/sample.php

Recommend this page to a friend!
  Classes of Rogério Taques  >  PHP Minify CSS and JavaScript  >  sample/sample.php  >  Download  
File: sample/sample.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Minify CSS and JavaScript
Compact and group CSS and JavaScript files
Author: By
Last change: Update of sample/sample.php
Date: 11 months ago
Size: 537 bytes


Class file image Download


// get settings and files to minify
// options are:
// f - Required. File or comma separated file list
// screen - Optional. Void. Forces the download of minified file.
// debug - Optional. Void. When given, skip minification.

$debug = isset( $_GET[ 'debug' ] ) ? TRUE : FALSE;
$screen = isset( $_GET[ 'screen' ] ) ? TRUE : FALSE;
$files = isset( $_GET[ 'f' ] ) ? $_GET[ 'f' ] : NULL;

$m = new RT\Minifyr($debug, $screen);
$m->files( explode(',', $files) )->uglify(true)->render();


For more information send a message to info at phpclasses dot org.