Yayınımız yeniliklerle beraber yeni sitemizden devam ediyor. Seditio.com.tr takip edin.
class.phpmailer.php Yerel sunucuda e-posta göndermek için kullanıyorum , yerel sunucumda PHP sürümüyle iyi işliyor php5.3.4ancak PHP sürümünü güncelledikten sonra 5.5.4aşağıdaki mesajı gösteriyor ise aşağıdaki adımları izleyin.
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in class.phpmailer.php`
Hataya neden olan satır
$encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', "'='.sprintf('%02X', ord(stripslashes('\\1')))", $encoded);
Alttaki ile değiştir.
$encoded = preg_replace_callback('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/',function($m) { return '='.sprintf('%02X', ord(stripslashes($m[1]))); }, $encoded);
Php 7 ve üst versiyonlar için ise alttakini uygulayın.
Bul
switch (strtolower($position)) {
case "phrase":
$encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/", "'='.sprintf('%02X', ord('\\1'))", $encoded);
break;
case "comment":
$encoded = preg_replace("/([\(\)\"])/", "'='.sprintf('%02X', ord('\\1'))", $encoded);
case "text":
default:
// Replace every high ascii, control =, ? and _ characters
$encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/',
"'='.sprintf('%02X', ord('\\1'))", $encoded);
break;
}
Değiştir
switch (strtolower($position)) {
case 'phrase':
$encoded = @preg_replace_callback("/([^A-Za-z0-9!*+\/ -])/e",function($m) { return '='.sprintf('%02X', ord(stripslashes($m[1]))); }, $encoded);
break;
case 'comment':
$encoded = @preg_replace_callback("/([\(\)\"])/e",function($m) { return '='.sprintf('%02X', ord(stripslashes($m[1]))); }, $encoded);
case 'text':
default:
// Replace every high ascii, control =, ? and _ characters
//TODO using /e (equivalent to eval()) is probably not a good idea
$encoded = @preg_replace_callback('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/',function($m) { return '='.sprintf('%02X', ord(stripslashes($m[1]))); }, $encoded);
break;
}
| PHP Warning: fsockopen(): unable to connect hatası çözümü | 10512 | 2020-12-21 |
| Contact Eklentisi Hata Çözümü | 6249 | 2020-04-02 |
| DNS_PROBE_FINISHED_NXDOMAIN Hatası Çözümü | 1525 | 2021-08-13 |
| Wrong value for the password Hatası Çözümü | 5220 | 2020-12-17 |
| Xampp Important! Because an activated User Account Control (UAC) Çözümü | 1636 | 2021-06-23 |