[英]class 'domdocument' not found laravel when sending email
我正在嘗試使用郵件系統向用戶發送驗證郵件
Mail::to($thisUser->email)->send(new varifyEmail($thisUser));
但它給了我
Class 'DOMDocument' not found
這是給出此錯誤的函數
protected function createDomDocumentFromHtml($html)
{
$document = new \DOMDocument('1.0', 'UTF-8'); // this is the line with error
$internalErrors = libxml_use_internal_errors(true);
$document->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
libxml_use_internal_errors($internalErrors);
$document->formatOutput = true;
return $document;
}
有人可以幫忙嗎??
對於 Ubuntu:**
apt-get install php7.0-xml
對於 CentOS / Fedora / Red Hat:**
yum install php70w-xml
重新啟動您的網絡服務器
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.