<?php
// This example minifies file "example.css" and displays its minified contents
// The original contents of the file are displayed only when working in non-cli mode
require ( "../../JavascriptMinifier.phpclass" ) ;
$input = "example.js" ;
$webmode = ( php_sapi_name ( ) != 'cli' ) ;
if ( $webmode )
{
echo "<h1>Contents of original file :</h1><pre>" ;
$contents = htmlspecialchars ( file_get_contents ( $input ) ) ;
echo "$contents</pre><br/><br/>" ;
echo "<h1>Contents of minified file :</h1><pre>" ;
}