Why am I getting a "unexpected end of file" syntax error? The error appears to be after the closing "?>" line but I can't find anything wrong with it.
<?php
require_once("classPage.php");
$page = new Page();
print $page->getTop();
print <<<EOF
<div id="mainContent">
<p>This is where content would go, should there be any.</p>
</div> <!-- end main content -->
EOF; // no space at start of this line
print $page->getBottom();
?>
<---- Error is here.
You probably have spaces after the terminator in your code examples, e.g.
Also check the space before
EOD;
. i.e. you have to place your endingheredoc
at the beginning of line.