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 Leandro Antonello  >  Page Header  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example of usage
Class: Page Header
Generate HTTP response and HTML page headers
Author: By
Last change: New way to use the updated class
Date: 2011-11-30 06:19
Size: 1,059 bytes
 

Contents

Class file image Download
<?php
require_once('pageheader.class.php');

// Get reference to the PageHeader Singleton instance
$header PageHeader::getInstance();

// Adds the page title and defaults headers to prevent cache.
$header->setTitle(".:: PageHeader Example ::.");
$header->addDefaults();

// Adds description, keywords and robots
$header->Description "Site description here";
$header->Keywords "site, website, keywords";
$header->addRobot('robots''index, follow');
$header->addRobot('googlebot''noodp');
$header->addRobot('msnbot''noodp');
$header->addRobot('slurp''noydir');

// Can defines a Favorite Icon too
//$header->Favicon = 'favicon.ico';

// Adds a CSS file that will be cacheable. Can use the alias addCss()
$header->addStyle('css/styles.css'TRUE);

// Adds a javascript file thats NOT will be chacheable. Can use the alias addJs()
$header->addScript('js/jquery-1.4.2.min.js'FALSE);

// Write down the entire header.
$header->write();
?>
<body>
    View source to inspect page header or use Firebug.
</body>
</html>