Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Błąd w funkcji eregi()
kilofmar
post
Post #1





Grupa: Zarejestrowani
Postów: 70
Pomógł: 0
Dołączył: 29.11.2006

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


Witam.
Zainstalowałem sobie lokalnie WampSerwer PHP 5.3.0 aby testować strunę i wywala mi błąd w takiej funkcji
Jak maiłem na serwerze Linuxowym (Debian) to było OK

  1. <?php
  2. foreach ($_GET as $check_url) {
  3.    if ((eregi(&#092;"<[^>]*script*\"?[^>]*>\", $check_url)) || (eregi(\"<[^>]*object*\"?[^>]*>\", $check_url)) ||
  4.        (eregi(&#092;"<[^>]*iframe*\"?[^>]*>\", $check_url)) || (eregi(\"<[^>]*applet*\"?[^>]*>\", $check_url)) ||
  5.        (eregi(&#092;"<[^>]*meta*\"?[^>]*>\", $check_url)) || (eregi(\"<[^>]*style*\"?[^>]*>\", $check_url)) ||
  6.        (eregi(&#092;"<[^>]*form*\"?[^>]*>\", $check_url))) {
  7.    die ();
  8.    }
  9. }
  10.  
  11. if (eregi('maincore.php', $_SERVER['PHP_SELF'])) die();
  12. ?>


Deprecated: Function eregi() is deprecated in C:\wamp\www\maincore.php on line 4
Deprecated: Function eregi() is deprecated in C:\wamp\www\maincore.php on line 4
Deprecated: Function eregi() is deprecated in C:\wamp\www\maincore.php on line 5
Deprecated: Function eregi() is deprecated in C:\wamp\www\maincore.php on line 5
Deprecated: Function eregi() is deprecated in C:\wamp\www\maincore.php on line 6
Deprecated: Function eregi() is deprecated in C:\wamp\www\maincore.php on line 6
Deprecated: Function eregi() is deprecated in C:\wamp\www\maincore.php on line 7
Deprecated: Function eregi() is deprecated in C:\wamp\www\dziennik\maincore.php on line 12
Go to the top of the page
+Quote Post
phpion
post
Post #2





Grupa: Moderatorzy
Postów: 6 072
Pomógł: 861
Dołączył: 10.12.2003
Skąd: Dąbrowa Górnicza




Czy tak ciężko:

a. Przeczytać i zrozumieć wygenerowane ostrzeżenia.
b. Zapoznać się z manualem dla eregi" title="Zobacz w manualu PHP" target="_manual, w którym jest napisane:
Cytat
Informacja: As of PHP 5.3.0 the regex extension is deprecated, calling this function will issue an E_DEPRECATED notice.

c. Finalnie dojść do wniosku, że należy użyć funkcji preg_match" title="Zobacz w manualu PHP" target="_manual.
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 19.08.2025 - 22:05