PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Andrey Nikishaev   JS & CSS Compressor   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example of using class
Class: JS & CSS Compressor
Merge and compress Javascript(JS) and CSS files
Author: By
Last change: rewrite example for new methods
Date: 15 years ago
Size: 694 bytes


Class file image Download
//include('js_merge_php4.php'); //for php4

$a=new jsCssCompressor();

// or if CSS $a->makeCss($arr,"js/a.js");

/* or

or if CSS


for compressing from data and output as a file for save.

$data="some string";
header("Content-Disposition: attachment; filename=compressed.js");
echo jsCssCompressor::compressJs($data);

or if CSS

$data="some string";
header("Content-Disposition: attachment; filename=compressed.css");
echo jsCssCompressor::compressCss($data);