Hello. I tried something, but i need help now. This is code:
PHP Code:
$category = "'".implode("', '",$_POST['category'])."'"; $sql2= "SELECT * FROM product WHERE name IN ($category)"; $result2 = mysql_query($sql2) or die(mysql_error()); while ($row2 = mysql_fetch_assoc($result2)){ $fileArray = array($row2['pdf']); include 'PDFMerger.php';
$pdf = new PDFMerger;
$pdf->addPDF($fileArray, 'all') ->merge('download', 'files/TEST.pdf'); }
And, this is PDFMerger.php addPDF function:
PHP Code:
public function addPDF($filepath, $pages = 'all') { foreach ($filepath as $file) { $this->_files[] = array("../admin/".$file."", $pages); } return $this; }
But, i get this error:
FPDF error: Cannot open ../admin/ !
Could you help me, please. Best regards, bye.
|