Hi guys I have a script in FPDF and PHP to create and save a PDF document. The script is not working (I guess the way I save the path is wrong). I'd like the user to click save and the document must be saved on a folder inside the server that is hosting the website (in this case is a QNAP). This is the script:
<?php
session_start();
$user = $_SESSION['username'];
$sicep = $_SESSION['sicep'];
$notesicep = $_SESSION['notesicep'];
require ('fpdf/fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',11);
$pdf->Cell(100, 8, 'Operatore Centrale Operativa: '.$user, 1 ,1);
$pdf->Cell(100, 8, 'Effettuato in data: ' .date("d/m/Y"). ' In ora: '.date("h:ia") , 1 ,1);
$pdf->Cell(180, 10, 'Verifica funzionale sistema SICEP MVS NET:',1,1);
$pdf->Cell(180, 10, $sicep,1,1);
$pdf->Cell(180, 10, 'Note: '.$notesicep,1,1);
$filename = "orario".date("d/m/Y")."-".date("h:ia").".pdf";
$dir = "/Web/PDF";
$pdf->Output($dir.$filename);
?>
The script location is:
\\192.168.1x.x\Web\Verifiche
And the PDF files should be save in this location:
\\192.168.1x.x\Web\PDF
How can I do it?