Page 1 of 1

Fpdf, permissions

Posted: Sun Mar 11, 2007 11:02 am
by jkashu
I am using Fpdf to create pdfs from text. The script creates the files flawlessly, however the permissions are set to 600, so no one can view the pdf files unless I manually go in and change the permissions.

This is the script that creates the pdfs:

Code: Select all

//Determine a temporary file name in the current directory
$tempfile=basename(tempnam(getcwd(),'pdf'));
rename($tempfile,$tempfile.'.pdf');
$tempfile.='.pdf';
//Save PDF to file
$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','',12);
$pdf->Write(5,$text);
$pdf->Output($tempfile);
$text being the text that appears in the pdf file.

Any ideas?

Posted: Sun Mar 11, 2007 11:10 am
by feyd