Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Camilo Sperberg  >  CSS Stacker and Compressor  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Usage examples
Class: CSS Stacker and Compressor
Compact several CSS files into a single file
Author: By
Last change: New example script.
Date: 4 years ago
Size: 801 bytes
 

Contents

Class file image Download
<html><head><title>test</title>
<?php
$proc 
TRUE;
include(
'config.php');
include(
'css.class.php');
$theCSS = new CSStacker();
$theCSS->add('css/lol.css');
$theCSS->add('xd.css');

echo 
'<link rel="stylesheet" type="text/css" href="'.$theCSS->printme('filename').'" />';
// Please note that with this method you won't be able to use the built-in header modifications features!
unset($theCSS);
?>
<!-- OR you can print it as a inline style: -->
<style><?php
$inlineCSS 
= new CSStacker();
$inlineCSS->add('lol.css');

$inlineCSS->printme('inline');
unset(
$inlineCSS);
?></style>
</head>
<body><p>Hello world!</p>
<p>This is an example of how to use the filename and inline options within your index.php file</p>
<p>As you can see, there isn't much difference</p></body></html>