我试图将dompdf与codeigniter一起使用但在添加初始代码后我收到了错误
遇到PHP错误
严重性:注意
消息:未定义的变量:core_settings
文件名:theme / application.php
行号:51
function pdf_create($html, $filename='', $stream=TRUE)
{
require_once("dompdf/dompdf_config.inc.php");
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
if ($stream) {
$dompdf->stream($filename.".pdf");
} else {
return $dompdf->output();
}
}
function pdf()
{
$this->load->helper(array('dompdf', 'file'));
$html = '<h1>HELLO WORLD</h1>';
pdf_create($html, 'filename');
}
<link rel="stylesheet" href="<?=base_url()?>assets/blueline/css/bootstrap.min.css?ver=<?=$core_settings->version;?>" />