I am a bit novice in PHP. Trying to create a design that is one and the same for all pages. So far I did this:
Code:
class dynamicPage (
var $ title;
/ / constructor
function dynamicPage ($ tit) (
$ title = $ tit;
)
function beginPage () (
echo ( '<! DOCTYPE HTML PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd ">');
echo ( '<html xml:lang="de" dir="ltr" xmlns="http://www.w3.org/1999/xhtml" lang="de"> <head>');
echo ( '<meta http-equiv="content-type" content="text/html; charset=UTF-8">');
echo ( '<title>'. $ title. '</ title>');
)
function setTitle ($ tit) (
$ title = $ tit;
)
function endPage () (
)
function getTitle () (
return $ title;
)
)
In index.php:
Code:
<? php
require_once ('../ libfirm / SQLFactory / dynamicPage.php ');
$ page = new dynamicPage ( "blaa");
$ page-> beginPage ();
?>
The problem is that after setting up this subject it ask the name of the page and does not generate its behalf words <title> </title> is empty.
Bookmarks