Page 1 of 1

What's wrong with class?

Posted: Tue Sep 23, 2003 12:06 pm
by php_wiz_kid
<?php
class Template {
function PageHeader() {
echo "<html>\n<head>\n";
}

function DisplayTemplate() {
$this->PageHeader();
}
}
$template = new Template();
$template->DisplayTemplate();
?>

What am I doing wrong?

Posted: Tue Sep 23, 2003 12:11 pm
by McGruff
Nothing.

View source?

Posted: Tue Sep 23, 2003 12:14 pm
by php_wiz_kid
I did but it's not working, I'll figure it out, thanks.

Posted: Tue Sep 23, 2003 12:39 pm
by McGruff
What exactly is the problem?

I tested it and view source was showing < head > and < html> OK.

Posted: Wed Sep 24, 2003 7:39 am
by php_wiz_kid
Yeah, I went home last night, tried it, and it worked. So something is wrong with the PHP on this machine. I'm going to re-install and see if anything happens. Thanks for you help.