$question

$answer `; } function col_whole($answer){ return `
$answer
`; } function col_side($left,$right){ return `
$left
$right
`; } if(Input::get('access')){ $subdomain = getSubdomain2(); $domain = get_subdomain_managed_domain_new_way($subdomain); $options = new Dompdf\Options; // $options->setChroot("/mnt/" . $domain['SystemUser'] . "/forms/templates/"); $options->setChroot("/mnt/" . $domain['SystemUser'] . "/temp/"); $options->setIsRemoteEnabled(true); $dompdf = new Dompdf\Dompdf($options); // $template = "/mnt/" . $domain['SystemUser'] . "/forms/templates/pdf_template.html"; $template = "/mnt/" . $domain['SystemUser'] . "/temp/" . Input::get('tmp_filename'); // $html = file_get_contents($template); // $html = str_replace(["{{ name }}", "{{ quantity }}"], [$name, $quantity], $html); // $dompdf->loadHtml($html); $dompdf->loadHtmlFile($template); $dompdf->render(); $dompdf->addInfo("Title", Input::get('title')); // "add_info" in earlier versions of Dompdf $dompdf->stream(Input::get('tmp_filename'), ["Attachment" => 0]); // $output = $dompdf->output(); // $filename = "file.pdf"; // file_put_contents($filename, $output); } ?>