[SOLVED] include(); places unaccounted for 1
Posted: Fri Apr 20, 2007 10:47 am
i'm using a variable to select an include path.
however, i am experiencing strangeness.
the method calls the include alright, but there is a random "1" appearing in the HTML output after the include ends.
i tested for errors by posting an empty include file and the "1" prevails!
nothing else echos!
the only thing that i can do to get rid of it is comment out the BEGIN EVENTS section.
WTF anyone?
however, i am experiencing strangeness.
the method calls the include alright, but there is a random "1" appearing in the HTML output after the include ends.
i tested for errors by posting an empty include file and the "1" prevails!
nothing else echos!
the only thing that i can do to get rid of it is comment out the BEGIN EVENTS section.
WTF anyone?
Code: Select all
$unitID = $_GET['unitID']
if(!empty($unitID)) {
$getEventDiv = "/includes/div/events/eventsDivUnitList.inc.php";
}Code: Select all
<div id="col2">
<!-- BEGIN EVENTS-->
[php]<? echo include($_SERVER['DOCUMENT_ROOT']."$getEventDiv"); ?>[/php]
<!-- END EVENTS-->
</div>