Results 1 to 7 of 7

Thread: Hide errors...

  1. #1

    Thread Starter
    Hyperactive Member dandono's Avatar
    Join Date
    Aug 2004
    Location
    Cornwall, UK
    Posts
    485

    Hide errors...

    Hi, i am working on my website and would like to hide the errors, warnings and notices. how is this done?
    thanks, dandono
    If there is only one perfect person in the universe, does that make them imperfect?

  2. #2
    Fanatic Member ALL's Avatar
    Join Date
    Jul 2004
    Location
    192.168.1.1
    Posts
    711

    Re: Hide errors...

    this link should solve it:

    http://us2.php.net/error_reporting
    Please support one of my projects?
    TKForums.com

    Web Forum
    JavaScript Wiki
    ________________________
    If somone helps you, please rate their post, by clicking the to rate their post

  3. #3

    Thread Starter
    Hyperactive Member dandono's Avatar
    Join Date
    Aug 2004
    Location
    Cornwall, UK
    Posts
    485

    Re: Hide errors...

    thanks. all i got to do is put this on first line or where i want it to stop reporting errors this:
    PHP Code:
    error_reporting(0); 
    thanks.
    If there is only one perfect person in the universe, does that make them imperfect?

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Hide errors...

    You can also modify the php.ini file to have all errors put in a file. This way you can still debug your scripts, however, the errors will not be displayed in the pages. Also, check the link in my signature to the error handling class, it enables you to specify a standard error handling function, which, you could use to display a standard error message to the user.

    P.s: Link for ALL http://www.vbforums.com/showthread.php?t=346624
    Last edited by visualAd; Jun 27th, 2005 at 10:50 PM.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: Hide errors...

    for this i just do $whattoread = @fopen($filename, "r") or die("");
    i dunno if it worx but its good for me

  6. #6

    Thread Starter
    Hyperactive Member dandono's Avatar
    Join Date
    Aug 2004
    Location
    Cornwall, UK
    Posts
    485

    Re: Hide errors...

    die() exits the script so it is not the best for forms.
    If there is only one perfect person in the universe, does that make them imperfect?

  7. #7
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: Hide errors...

    o ok

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width