Jump to content

[PHP] get fwrite to write variable names


powelly

Recommended Posts

Im using fwrite to generate a php file with the following code:

 

$Data = "</body>
</html>
<?
// Output-Buffer in variable:
$html=ob_get_contents();
// delete Output-Buffer
ob_end_clean();
$pdf = new HTML2FPDF();
$pdf->DisplayPreferences('HideWindowUI');
$pdf->AddPage();
$pdf->WriteHTML($html);
$pdf->Output('doc.pdf','I');
?>";
fwrite($Handle, $Data);

print "Data Written ";
fclose($Handle);

 

However its trying to write the contents of the variables rather than the variable names, so the output I get is:

 

</body>
</html>
<?
// Output-Buffer in variable:
=ob_get_contents();
// delete Output-Buffer
ob_end_clean();
= new HTML2FPDF();
('HideWindowUI');
();
();
('doc.pdf','I');
?>

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/85793-php-get-fwrite-to-write-variable-names/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.