Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php] Zmiana na PHP 5.3 i problem z eregi
yamaka
post
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 14.10.2009

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


Witam

Mam teraz na serwerze PHP 5.3 i pojawiły się problemy ze stronami, a mianowicie komunikat:
Deprecated: Function eregi() is deprecated in

w wierszu:
if(eregi('http://'.$_domain, $integration['xml_url']) || eregi('http://www.'.$_domain, $integration['xml_url'])){ $alert = true; }else{ $alert = false; }

Jakich dokonać zmian, żeby ten komunikat się nie pokazywał?

Nie chcę ukrywać komunikatu przez @ tylko rozwiązać problem nowym parametrem.

Pozdrawiam
yamaka

Go to the top of the page
+Quote Post
pedro84
post
Post #2





Grupa: Nieautoryzowani
Postów: 2 249
Pomógł: 305
Dołączył: 2.10.2006

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


Zmienić na preg_match(). Przykład: http://stackoverflow.com/questions/1374881...i-to-preg-match
Go to the top of the page
+Quote Post
yamaka
post
Post #3





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 14.10.2009

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


Otrzymałem poprawny kod:

Kod
$alert = (1 === preg_match("~http://(www\.)?~" . $doamin, $integration['xml_url']));


Pozdrawiam

Ten post edytował yamaka 13.03.2012, 23:38:40
Go to the top of the page
+Quote Post

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: 17.09.2025 - 16:11