<?php
class GeneratePage {
var $title;
var $pageContent;
function Display( ) {
echo "<html>\n<head>\n";
$this->displayTitle();
echo "\n</head>\n<body>\n";
echo $this->pageContent;
echo "\n</body>\n</html>\n";
}
function displayTitle() {
echo "<title>" . $this->title . "</title>\n";
}
function SetContent($Data) {
$this->pageContent = $Data;
}
}
//call the class to generate the page
$newPage = new GeneratePage;
$mypageContent = "The quick brown fox jumps over the lazy dog.";
$newPage->title = "A Sample Page.";
$newPage->SetContent($mypageContent);
$newPage->Display();
?>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment