Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP] Funkcja ereg, ereg_replace - błąd
Forum PHP.pl > Forum > Przedszkole
Carveth
Witam.

Mam pewien kod:

  1. $tld = $Levels[$sLevels-1];
  2. $tld = ereg_replace("[>)}]$|]$", "", $tld);
  3. if (strlen($tld) < 2 || strlen($tld) > 3 && $tld != "arpa") $fail = 1;
  4. $Level--;
  5.  
  6. if ($Level && !$fail) {
  7. $Level--;
  8. if(!ereg($tld.":", $gTLDs) && !ereg($tld.":", $CCs)) $fail = 2;
  9. }


Gdzie występuje mi błąd:

Deprecated: Function ereg_replace() is deprecated in /xxx/verifymail.php on line 67

Deprecated: Function ereg() is deprecated in /xxx/verifymail.php on line 75

Deprecated: Function ereg() is deprecated in /xxx/verifymail.php on line 75

Jak powinienem poprawić kod by był zgodny z najnowszymi standardami php? Liczę na pomoc wink.gif
nospor
Musisz przesiać to na preg_match oraz preg_replace
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.