PHPでOOPを使用して、スタイルシートを取得し、他のクラスから出力を取得する関数があります。TCPDFm を使用して pdf を生成する必要がありますが、$html 変数を渡す方法に問題があります。使用している XHTML+ CSS のマニュアルを読みましたが、PHP 変数の出力が説明されていません。ここにコードを貼り付けています。助けてください。
<?php
// define some HTML content with style
$html = <<<EOF
<?php $frame->HTML_DOCTYPE(); ?>
<html>
<head><?php $frame->HTML_Title($page); $frame->HTML_CSS($page); $frame->HTML_JS($page); ?></head>
<body>
<div class='container_pngfix'>
<?php echo $frame->Print_Top($page); ?>
<div class='container_magazine'>
<div class='magazine_left'>
<?php
/*if(FALSE == empty($_SESSION['wi_id']) && FALSE == empty($_SESSION['wi_type']) && 0 == strcasecmp('bride',$_SESSION['wi_type'])){*/
if ($_REQUEST['magazineId']!="") {
echo $article->Print_Magazine_Issue($_REQUEST['magazineId']);
} else if ($_REQUEST['latestissue']) {
echo $article->Print_Magazine_Issue($article->getLatestMagazineId());
} else {
if (isset($_REQUEST['magazinedate'])) { $magazinedate=$_REQUEST['magazinedate']; } else { $magazinedate=""; }
if ($magazinedate=="") { $magazinedate=date("Y-m")."-01"; }
echo $article->Print_Magazine($magazinedate);
}
/*}else{
echo "<h2>Please Login/Register first to see Magazine details</h2>";
}*/
?>
</div>
<div class='magazine_right'><?php echo $frame->Print_RightSide_Articles($page); ?></div>
<div class='clearfloat'> </div>
<?php echo $frame->get_ContextualWeb($page,"low"); ?>
</div>
</div>
<?php echo $frame->Print_Bottom_Links($page); ?>
<?php $frame->Print_Bottom($page); ?>
</div>
</body>
</html>EOF;
$pdf->writeHTML($html, true, false, true, false, '');
$pdf->lastPage();
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_061.pdf', 'I');
?>
このコードでは、これらのクラスのオブジェクトを使用して複数の関数を呼び出しています。ページのすべての html とコンテンツは動的に生成されます。$html 変数で PAGE html と PHP コードを渡す際に問題があります。