看板 PHP 關於我們 聯絡資訊
我使用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
arrack:因為eregi在6.0會被移除,所以從5.3開始會出現不推薦 10/04 08:16
arrack:因該是把錯誤訊息的notice level關掉即可 10/04 08:17
a10012230:感謝!!! 10/05 04:17