As admin, I have the ability to use the PHP code input format on nodes. On a single page, I want to include content from an include file managed outside of Drupal.
When using the virtual function, the content from the include file is inserted, but at the top of the page.
For example:
$my_content = virtual('/inc/test.inc');
print $my_content;
In searching the forums, it sounds like Drupal 6 immediately returns the content of functions like virtual. I also discovered several posts that suggested using ob_get_contents, but that didn't work either -- the content was once again added to the top of the page.
For example:
ob_start();
virtual('/inc/test.inc');
$output = ob_get_contents();
ob_end_clean();
return $output;
And it seems like Apache server side includes are not an option.
Any other ideas on how to use PHP to include a file in the body of a node?
Comments
What is inside the file,
What is inside the file, HTML, PHP, other?
File contents
The contents of the included file is plain old HTML. Again, the content is included fine, but it is not being included in the correct spot. Rather, it is being included prior to the page template code.