我試圖使用SMTP發送電子郵件,但它似乎錯誤發生在行使用require_once('Mail.php')使用smtp錯誤發送電子郵件;
require_once('Mail.php');
(出處:http://stackoverflow.com/questions/712392/send-email-using-gmail-smtp-服務器從-PHP頁面)
Warning: require_once(Mail.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/p/forgot.php on line 4
Fatal error: require_once(): Failed opening required 'Mail.php' (include_path='.:/Applications/MAMP/bin/php/php5.4.4/lib/php') in /Applications/MAMP/htdocs/p/forgot.php on line 4
這是該消息時我輸入:梨梨安裝後-V
PEAR Version: 1.9.4 PHP Version: 5.4.4 Zend Engine Version: 2.4.0 ...
我怎麼能包括 'Mail.php'?
此問題是由
檢查解決所在的路徑安裝
$ pear config-get php_dir
然後在php.ini文件