我正在使用Dompdf创建PDF文件,但我不知道为什么它不会将创建的PDF保存到服务器.
有任何想法吗?
require_once("./pdf/dompdf_config.inc.php");
$html =
'<html><body>'.
'<p>Put your html here, or generate it with your favourite '.
'templating system.</p>'.
'</body></html>';
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
file_put_contents('Brochure.pdf', $dompdf->output());
Run Code Online (Sandbox Code Playgroud) 我有一个具有这种结构的项目:
src
|- index.pug
| - layout
| |- index.less
| - scripts
| |- index.js
Run Code Online (Sandbox Code Playgroud)
现在,当我运行 parcel build src/index.pug 时,所有文件都被捆绑在一起,并且我在分发文件夹中找到了它:
dist
|- index.html
|- index.12345.css
|- index.12345.js
Run Code Online (Sandbox Code Playgroud)
当我期待这样的事情时:
ist
|- index.html
|- layout
| |- index.12345.css
|- scripts
| |- index.12345.js
Run Code Online (Sandbox Code Playgroud)
所以,我的问题是:我可以使用 ParcelJS 为我的 CSS、js 和图像指定输出路径吗?