Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Błędy
-golone-
post
Post #1





Goście







Jak mozna ukryć błedy wyswietlane przez php w przypadku błedu przed odwiedzajacymi i żeby sie wyswietlały tylko na localhoscie, albo w panelu administracyjnym?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
peterj
post
Post #2





Grupa: Zarejestrowani
Postów: 121
Pomógł: 0
Dołączył: 9.02.2004
Skąd: Warszawa

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


Manual php -> error_reporting

  1. <?php
  2.  
  3.  
  4. // Turn off all error reporting
  5.  
  6. // Report simple running errors
  7. error_reporting(E_ERROR | E_WARNING | E_PARSE);
  8.  
  9. // Reporting E_NOTICE can be good too (to report uninitialized 
  10. // variables or catch variable name misspellings ...)
  11. error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
  12.  
  13. // Report all errors except E_NOTICE
  14. // This is the default value set in php.ini
  15. error_reporting(E_ALL ^ E_NOTICE);
  16.  
  17. // Report all php errors (bitwise 63 may be used in php 3)
  18.  
  19. // Same as error_reporting(E_ALL);
  20. ini_set('error_reporting', E_ALL);
  21.  
  22. ?>


Update:
Jeżeli chcesz żeby błędy były wyświetlane tylko na localhoscie to zrób tak(wstaw na początku plików z kodem php):
  1. <?php 
  2. if($_SERVER['REMOTE_ADDR'] == &#092;"127.0.0.1\"){
  3. }
  4. else{
  5. }
  6. ?>


Ten post edytował peterj 11.11.2004, 12:48:25


--------------------
Warsztat: Apache 1.3.29 / PHP 4.3.4 / MySQL 3.23.58 / Winsyntax
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 - 19:18