<?php
// This example minifies file "example.html" and displays its minified contents
// The original contents of the file are displayed only when working in non-cli mode
require ( "../../HtmlMinifier.phpclass" ) ;
$input = "example.html" ;
$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>" ;
}