php代码保存由PHP代码生成的pdf文件

时间:2018-03-17 06:55:32

标签: php pdf pdf-generation createfile

我按照这些教程使用php代码创建了PDF https://www.siteground.com/kb/how_to_generate_pdf_files_with_php/

.pdf在网络浏览器上正确显示。 我需要将此.pdf文件保存在本地计算机上的特定文件夹中。 请帮我这样做。 我试过了

file_put_contents($newFileName, $newFileContent);

但它总是返回false。

1 个答案:

答案 0 :(得分:0)

在这里有所了解。显然,我试图写入不可写的文件夹。

fopen doesn´t work with something different than r php