Hello there,
I am trying to run a .php file referencing a class defined to contain all the meta data for the site. (from the book "Creating Interactive Web Services").
When running the page I get a blank output in the browser (no error messages whatsoever). The Page Source is also empty.
I am expecting to see in the page source all the values I have assigned to the variables in the
mylay out.php file.
Can you tell me please where I am wrong?
Below is the file:
<?php
function myheader ($ptitle)
{
// Include the file clsMetaContent.
include $_SERVER ['DOCUMENT_ROOT']."/clsMetaContent.php" ;
$meta = &new Meta ;
$meta->company_name = "My Company" ;
$meta->description = "My first enabled PHP site!" ;
$meta->keywords2 = "PHP, MySQL, Web Development, Arthur" ;
$meta->sitename = "Arthur's Personal Web Site" ;
$meta->slogan = "Learning Web Development with PHP" ;
$meta->generator = "PHP" ;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional/EN">
<html>
<head>
<?php
echo $meta->metadata ($ptitle) ;
?>
</head>
<body>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td colspan="3" background="yellow_weave.gif" ALT="My Personal Web Site"> </td>
</tr>
<tr>
<td> </td>
<td>
<!-- End of the header part and begining of Content area. -->
<?php
}
function myfooter ()
{
?>
<!-- End of the content area and beginning of the footer. -->
</td>
<td> </td>
</tr>
<tr>
<td width="10%"> Test </td>
<td width="80%"> </td>
<td width="10%"> </td>
</tr>
</table>
</body>
</html>
<?php
}
?>
Thank you very much.