ここにPHPのヘルプが必要です。含まれているコンテンツは「1」と表示されていますが、その内容は表示されている必要があります。ここでは、関数の短縮バージョンは次のとおりです。ob_start()内のinclude()の使用
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
任意のアイデアは、私はこの問題を解決する方法は?
ありがとうございました。 –