Использование include () в ob_start ()

Здесь нужна небольшая помощь PHP, включенное содержимое отображается как '1', что означает, что оно истинно, но нужно, чтобы его содержимое отображалось, и я не уверен, почему это не так ' т. Вот сокращенная версия функции:

public function content {
    $website->content = 'Some content here. ';
    ob_start();
    include('myfile.php');
    $file_content = ob_end_clean();
    $website->content .= $file_content;
    $website->content .= ' Some more content here.';
     echo $website->content;
}

Это выводит:

Some content here 
1 
Some more content here

Когда мне нужно выводить:

Some content here
'Included file content here'
Some more content here

Есть идеи, как я могу это исправить?

7
задан Chris Pynegar 14 December 2011 в 19:39
поделиться