即使安裝了 php-pear,PHP 載入「Mail/mimeDecode」時也會發生致命錯誤

即使安裝了 php-pear,PHP 載入「Mail/mimeDecode」時也會發生致命錯誤

我有 centos 機器,我使用 yum install php-pear 進行安裝。所以我在我的 php 頁面中嘗試了這個

require_once 'Mail/RFC822.php';
require_once 'Mail/mimeDecode.php';

我收到此錯誤“ Warning: require_once(Mail/mimeDecode.php): failed to open stream: No such file or directory in /var/www/html/pro1/ast/include.inc.php on line 36 Fatal error: require_once(): Failed opening required 'Mail/mimeDecode.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/pro1/ast/include.inc.php on line 36”。還需要安裝什麼?

答案1

為了其餘的人的利益。除了執行 yum install php-pear 之外。接下來是 pear install Mail,最後你需要 yum install php-pear-Mail-mimeDecode。到目前為止,這對我有幫助。

答案2

為了完整起見,請先安裝梨包,然後跟進郵件郵件mime作為:

dnf install php-pear-Mail
pear install Mail Mail_Mime

這應該適用於 CentoOS 或 Rocky Linux;如果不支援 dnf,請使用 yum。

相關內容