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
私のコード:
$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
には明らかにURLが含まれています。それはうまくいきません。 $filename
の場合と同様に、ローカルパスに設定します。
$upload_dir = wp_upload_dir();
$filename = $upload_dir["basedir"] . '/deals/deal' . $page->id . '.pdf';