Встроенный php-скрипт не выполняется, когда я генерирую pdf, только часть html печатается в pdf. Я уже установил $isPhpEnabled =True.
<?php
// include autoloader
require_once 'dompdf/autoload.inc.php';
// reference the Dompdf namespace
use Dompdf\Dompdf;
// instantiate and use the dompdf class
$dompdf = new Dompdf();
$abc="This is the php text";
$html = <<<'ENDHTML'
<html>
<head>
<style>
h1{color:#555555;width:100%;border-bottom:2px solid powderblue;}
</style>
</head>
<body>
<h1 >Name : <script type="text/php"> echo $abc; </script></h1>
</body>
</html>
ENDHTML;
$dompdf->loadHtml($html);
// (Optional) Setup the paper size and orientation
$dompdf->setPaper('A4', 'landscape');
// Render the HTML as PDF
$dompdf->render();
// Output the generated PDF to Browser
$dompdf->stream("dompdf_out.pdf", array("Attachment" => false));
exit(0);
?>
$abc
не печатает? - person Paritosh Mahale   schedule 10.10.2017$a = array('one','two','three','four','five'); $abc="This is the php text"; $html = " <html> <head> <style> h1{color:#555555;width:100%;border-bottom:2px solid powderblue;} </style> </head> <body> "; foreach($a as $value){ $html .= '<h1>'.$value.'</h1>'; } $html .='</body></html>'; echo $html;
- person Paritosh Mahale   schedule 11.10.2017