Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Page {
- var $content;
- var $footer;
- var $title;
- function Display( ) {
- $this->displayheader();
- $this->displaycontent();
- $this->displayfooter();
- }
- function displayheader( ) {
- echo "<html><head>";
- echo "<TITLE>" . $this->title . "</TITLE>\n</head>";
- }
- function displaycontent(){
- echo "<body>".$this->content;
- }
- function displayfooter(){
- echo "<div>".$this->footer."</div></body></html>";
- }
- }
- ?>
- <?php
- $page = new Page;
- $page->title = "PHP klase";
- $page->content = "Test";
- $page->copyright = "D4T4X copyright";
- $page->Display();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement