I’m working on http://usborrow.com. The site used to be able to output the data to a PDF, however I am now getting the following error:
Error: [2] /home/usborrow/public_html/gfe.php on line 218
fopen(docs/30b583784503f7dc61999d234c67e204.pdf) [function.fopen]: failed to open stream:
No such file or directory
The script around line 218 is as follows:
// Create the pdf
$pdfmaker = new pdftk_php();
$pdfmaker->make_pdf($fdf_data_strings, $fdf_data_names, $fields_hidden, $fields_readonly, $pdf_original, $pdf_filename);
// Create the attachment and params
$fileatt = '/'.$pdf_filename;
$fileatttype = "application/pdf";
$fileattname = $offer->hashval.'.pdf';
$file = fopen($fileatt, 'rb');
$data = fread($file, filesize($fileatt));
$data = chunk_split(base64_encode($data));
fclose($file);
$random_hash = md5(date('r', time()));
I’ve tried changing the permissions on the Docs folder, however it’s still not working. Any support would be greatly appreciated.
Maybe its not for the kind of read .. its for the path
try this before the fopen: