Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Deprecated: Function ereg() is deprecated, problem po aktualizacji php5
sebastian403
post
Post #1





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 29.11.2007

Ostrzeżenie: (0%)
-----


Witam mam jeden problem który po aktualizacji mojego php5 się uaktywnił, mianowicie.

Deprecated: Function ereg() is deprecated in /home/***/inc/functions.php on line 24

funkcja z 24 linii wygląda tak:

if(ereg("^[^@ ]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2}|net|com|gov|mil|org|edu|int)\$",$EmailAddress)) return true;

Może ktoś podpowiedzieć co muszę zmienić żeby uniknąć tego błędu?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
sebastian403
post
Post #2





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 29.11.2007

Ostrzeżenie: (0%)
-----


  1. function isAddressValid($EmailAddress)
  2. {
  3. if(ereg("^[^@ ]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2}|net|com|gov|mil|org|edu|int)\$",$EmailAddress)) return true;
  4. else return false;
  5. }


tak tylko sprawdzać

Ten post edytował sebastian403 14.03.2016, 08:37:00
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.10.2025 - 10:49