0
I have a script that generates a pdf file. The file name is set in Mergepdf.class.php
But I wanted it to be set in the source file (variable $filename), where it calls this php, which is below:
//destination path for the User PDF file:
$nomearquivo = 'teste';
$pdfUserfile = JPATH_SITE.'/pdf/pdf-padrao1.pdf';
copy($pdfUser,$pdfUserfile);
require_once("/home/site/public_html/scripts/pdf/MergePdf.class.php");
MergePdf::merge(
Array(
$pdfUserfile,
$arquivoiptu
),
MergePdf::DESTINATION__DISK_INLINE
);
Then I would need to pass this $filename to Mergepdf.class.php, but I don’t know how to do it.
There are many responses on the site that deal with this, including one (that is not yet Inkei above) which is exactly what was covered in your (to use include/require); I suggest a search at the top of the site. As I find other link links in your question as well. It would help if you clicked on [Dit] and explained a little better why you need it, then maybe you can point to the most efficient way for your case.
– Bacco