[請益] phpmailer的問題

看板PHP作者 (???)時間16年前 (2009/10/04 04:55), 編輯推噓1(102)
留言3則, 2人參與, 最新討論串1/2 (看更多)
我使用PHP5.3.0 我去下載了phpmialer for PHP5/6的版本 我現在的信件都可以寄出 也收得到 到是寄出後會發生一段錯誤 Deprecated: Function eregi() is deprecated in C:\wamp\www\demo\class.phpmailer.php on line 599 Message sent! 以下是那一段程式碼 /* Retry while there is no connection */ while($index < count($hosts) && $connection == false) { $hostinfo = array(); if(eregi('^(.+):([0-9]+)$', $hosts[$index], $hostinfo)) { $host = $hostinfo[1]; $port = $hostinfo[2]; } else { $host = $hosts[$index]; $port = $this->Port; } 這一段程式碼是phpmailer內建的class.phpmailer.php檔裡面的寫好的 我不清楚為什麼會有錯誤= = 希望有高手能幫我解惑! 感謝!!! 但是信件卻能正常寄出= = -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.136.155.130

10/04 08:16, , 1F
因為eregi在6.0會被移除,所以從5.3開始會出現不推薦
10/04 08:16, 1F

10/04 08:17, , 2F
因該是把錯誤訊息的notice level關掉即可
10/04 08:17, 2F

10/05 04:17, , 3F
感謝!!!
10/05 04:17, 3F
文章代碼(AID): #1Anxf8Ox (PHP)
討論串 (同標題文章)
文章代碼(AID): #1Anxf8Ox (PHP)