file_get_contents拒绝连接centos7

时间:2019-08-01 17:39:11

标签: php linux mpdf

我为客户制作了一个应用程序,该应用程序正在向数据库发送订单,然后从cms可以将这些订单打印或下载为PDF并保存在文件夹中,问题出在我的主机上,付费主机正在工作,但是当我移动时linux机器上的整个应用程序,我开始下订单,我得到这个:

  

警告:file_get_contents(http://xxxxxxxx.com:84/comanda-detalii.php?id=48):无法打开流:在第46行的/var/www/html/comenzi.php中,连接被拒绝

第46行看起来像这样:

$url =  (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://".$_SERVER['HTTP_HOST'];
$message = "Catre xxxxxx Print SRL</br>Prin prezenta comanda ferma va rugam sa ne tipariti urmatoarea publicatie :</br>";
$message .= file_get_contents($url.'/comanda-detalii.php?id='.(int)$orderId);
$title = "Comanda ferma";
$pdf = buildPdf($message,"Detalii comanda.pdf");
sendEmail($message,$to,$title,["continut"=>$pdf,"nume"=>"Detalii comanda.pdf"]);
file_put_contents("arhiva/Comanda ".$orderId.".pdf",$pdf);
header('Location: '.$currentpath);

我在此文件上做什么?当用户下订单时,我使用MPDF将该订单创建为PDF并将其作为附件发送到电子邮件中,保存在文件夹中。

0 个答案:

没有答案
相关问题