PHP Warning: file_put_contents(http://lendersmatch.ca/wp-content/uploads/deals/deal1.pdf): failed to open stream: HTTP wrapper does not support writeable connections in /home/t21jv08zz60b/public_html/wp-content/plugins/mortgage/fpdf181/fpdf.php on line 1023
[27-Jan-2018 11:24:20 UTC] PHP Fatal error: Uncaught Exception: FPDF error: Unable to create output file: http://lendersmatch.ca/wp-content/uploads/deals/deal1.pdf in
Mon code:
$filename=$upload_path.'deals/deal'.$page->id.'.pdf';
ob_clean();
$pdf->Output('F',$filename);
FPDF:
if(!file_put_contents($name,$this->buffer))
$this->Error('Unable to create output file: '.$name);
break;
$name
contient apparemment une URL. Ça ne marchera pas. Définissez-le sur un chemin local, comme vous l'avez fait avec $filename
:
$upload_dir = wp_upload_dir();
$filename = $upload_dir["basedir"] . '/deals/deal' . $page->id . '.pdf';