sending mail using php and pear on windows

后端 未结 2 2102
-上瘾入骨i
-上瘾入骨i 2021-01-06 18:44

I am trying to send an e-mail using php script but i am getting errors this is my code.i am using xampp netbeans and windows. and i included pear in the php.ini file but sti

2条回答
  •  时光取名叫无心
    2021-01-06 19:32

    Yes jeroens method doesn't show the warning messages, but does it actually solve the problem? apprehending @ just hides the warning associated with it.

    To fix the problem in Mail.php modify the following

    function &factory($driver, $params = array())
    

    Change it to

    static function &factory($driver, $params = array())
    

    Reason for this error is because PEAR Mail has not been updated to PHP5 Standards and still uses PHP4 so gradually as servers become PHP5 Compliant this will become more frequent. Its better to fix rather than hide.

    Hope this helps

提交回复
热议问题