include () problems
| From: | Mjec | Date: | Mon, 25 Aug 2003 07:56:17 +0000 |
| Subject: | include () problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-160648@lists.php.net to get a copy of this message | ||
Hi,
When I run the line:
include ("fnord.php");
with the file looking like:
<?php
define ("fnord_included", true);
function fnord ($arg = true) {
// 450 lines
return $msg;
}
?>
it prints out the return of fnord() (i.e. $msg). I've checked, and there's
no echo or print statemetns anywhere...
Oh, yeah, FYI, the pattern goes like this:
file: index.php
<?php include ("standard.php"); /* rest of page */ ?>
file: standard.php
<?php /* a few defines */ include("fnord.php"); /* rest of stuff */ header
("Content-type: text/html; encoding=utf-8"); ?>
and it prints it right up the top of index.php, causing an error with the
"header" statement (although it says the error is in fnord.php - which
contains NO header statemtns).
ideas?
Regards,
mjec