new to this and me and classes have never mixed well, im getting no errors
but the only thing displaying is the copyright at the bottom of the page
Anyone tell me whats wrong?
Home.php_______ ______________
<?php
require('includ es/page.inc');
$homepage = new page();
$homepage ->SetContent('<t able width="95%" height="239" border="0"
align="center" cellpadding="0" cellspacing="0" >\n
<tr>\n<td width="120" height="69" bgcolor="#99CC0 0"
align="center"> jhg </td>\n <td>this was inherited</td>\n</tr>
</table>'
);
$homepage->Display();
?>
Page.inc_______ _______________ _
<?php
//page class
class page
{
var $content;
var $title ='childhood memories';
var $keywords='chil dhood memories, peoples childhood of days gone by';
// class functions
function SetContent($new content)
{
$this->content = $newcontent;
}
function SetTitle($newti tle)
{
$this->title = $newtitle;
}
function SetKeywords($ne wkeywords)
{
$this->keywords = $newkeywords;
}
function DisplayHeader()
{
?>
<table width="95%" height="87" border="0" align="center" cellpadding="0"
cellspacing="0" >
<tr bgcolor="#99CC0 0">
<td height="87">&nb sp;</td>
<td width="745" height="87" bgcolor="#99CC0 0"> </td>
</tr>
</table>
<?php
}
function display()
{
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01
Transitional//EN\">\n<html>\n <head>";
$this->DisplayTitle() ;
$this->DisplayKeyword s();
$this->DisplayStyles( );
echo "</head>\n<body\n" ;
$this->DisplayHeader( );
$this->content;
echo "<center>© 2004 Jarrowonline</center>";
echo "</body>\n</html>";
}
function DisplayTitle()
{
echo'<title> $this->$title</title>';
}
function DisplayKeywords ()
{
echo "<META name=\"keywords \" content=\"$this->keywords\">" ;
}
function DisplayStyles()
{
echo '<link href=\"css/style.css\" rel=\"styleshee t\" type=\"text/css\">';
}
function IsURLCurrentpag e()
{
if(strpos($GLOB ALS['SCRIPT_NAME'],$url)==false)
{
return false;
}
else
{
return true;
}
}
}
?>
_______________ _______________ ______
TIA
but the only thing displaying is the copyright at the bottom of the page
Anyone tell me whats wrong?
Home.php_______ ______________
<?php
require('includ es/page.inc');
$homepage = new page();
$homepage ->SetContent('<t able width="95%" height="239" border="0"
align="center" cellpadding="0" cellspacing="0" >\n
<tr>\n<td width="120" height="69" bgcolor="#99CC0 0"
align="center"> jhg </td>\n <td>this was inherited</td>\n</tr>
</table>'
);
$homepage->Display();
?>
Page.inc_______ _______________ _
<?php
//page class
class page
{
var $content;
var $title ='childhood memories';
var $keywords='chil dhood memories, peoples childhood of days gone by';
// class functions
function SetContent($new content)
{
$this->content = $newcontent;
}
function SetTitle($newti tle)
{
$this->title = $newtitle;
}
function SetKeywords($ne wkeywords)
{
$this->keywords = $newkeywords;
}
function DisplayHeader()
{
?>
<table width="95%" height="87" border="0" align="center" cellpadding="0"
cellspacing="0" >
<tr bgcolor="#99CC0 0">
<td height="87">&nb sp;</td>
<td width="745" height="87" bgcolor="#99CC0 0"> </td>
</tr>
</table>
<?php
}
function display()
{
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01
Transitional//EN\">\n<html>\n <head>";
$this->DisplayTitle() ;
$this->DisplayKeyword s();
$this->DisplayStyles( );
echo "</head>\n<body\n" ;
$this->DisplayHeader( );
$this->content;
echo "<center>© 2004 Jarrowonline</center>";
echo "</body>\n</html>";
}
function DisplayTitle()
{
echo'<title> $this->$title</title>';
}
function DisplayKeywords ()
{
echo "<META name=\"keywords \" content=\"$this->keywords\">" ;
}
function DisplayStyles()
{
echo '<link href=\"css/style.css\" rel=\"styleshee t\" type=\"text/css\">';
}
function IsURLCurrentpag e()
{
if(strpos($GLOB ALS['SCRIPT_NAME'],$url)==false)
{
return false;
}
else
{
return true;
}
}
}
?>
_______________ _______________ ______
TIA
Comment