Include/require and the HTML Code

From: Date: Wed, 14 Aug 2002 08:44:16 +0000
Subject: Include/require and the HTML Code
Groups: php.general 
Request: Send a blank email to php-general+get-112627@lists.php.net to get a copy of this message
Hi, Can anybody tell me why I get a "Parse error: parse error, unexpected '}' in /usr/local/apache/htdocs/logbook/Functions.inc on line 17 " for the following code: Appreciate any help. Using PHP 4.2.2 and Apache 1.3.26 on Redhat 7.3 x86 (The "--------" stuff is not part of the code. index.php and Functions.inc exists in the same dir) ---------------------------- File: index.php ---------------------------- <? require('./Functions.inc'); HtmlHeader(); # Do things HtmlFooter(); ?> ---------------------------- End of file ---------------------------- ---------------------------- File: Functions.inc ---------------------------- function HtmlHeader() { ?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
       <html><head>
       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
       <title>LogBook</title>
       </head>
       <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#000080" alink="#FF0000">
<? return; } ----------- This is line 17, the error point...... function HtmlFooter() { ?> </body> </html> <? return; } ---------------------------- End of file ---------------------------- Thanks Mike.

« previous php.general (#112627) next »