在带有vps nginx的DOMPF codeigniter中找不到图像
我的应用程序使用codeigniter构建,并使用dompdf查看pdf。当我在vps nginx中运行我的应用程序时,问题是在使用dompdf查看pdf时找不到图像 注:在带有vps nginx的DOMPF codeigniter中找不到图像,codeigniter,nginx,dompdf,Codeigniter,Nginx,Dompdf,我的应用程序使用codeigniter构建,并使用dompdf查看pdf。当我在vps nginx中运行我的应用程序时,问题是在使用dompdf查看pdf时找不到图像 注: 如果我使用html查看并使用内部链接在nginx中更改应用程序中的url图像,则会显示图像 如果我使用dompdf查看pdf,并使用外部链接在nginx的应用程序中更改url图像,则会显示图像 如果我的应用程序在localhost或hosting cpanel中运行,则不会出现问题,图像会显示出来 请帮帮我,谢谢 我的图
- 如果我使用html查看并使用内部链接在nginx中更改应用程序中的url图像,则会显示图像
- 如果我使用dompdf查看pdf,并使用外部链接在nginx的应用程序中更改url图像,则会显示图像
- 如果我的应用程序在localhost或hosting cpanel中运行,则不会出现问题,图像会显示出来
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Pdfgenerator {
public function generate($html, $filename='', $stream=TRUE, $paper = 'A4', $orientation = "potrait")
{
$dompdf = new Dompdf();
$dompdf->loadHtml($html);
$dompdf->set_option('isRemoteEnabled', TRUE);
$dompdf->setPaper($paper, $orientation);
$dompdf->render();
if ($stream) {
$dompdf->stream($filename.".pdf", array("Attachment" => 0));
} else {
return $dompdf->output();
}
}
}