Jump to content


Photo

Disable Warning errors


  • Please log in to reply
3 replies to this topic

#1 Horst Azeglio

Horst Azeglio
  • Members
  • PipPip
  • Member
  • 24 posts

Posted 30 May 2006 - 06:57 PM

Is it possible to disable warning errors with a php function? I cannot access PHP.ini

#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 30 May 2006 - 06:59 PM

Yes, you can use error_reporting(0)
[a href=\"http://www.php.net/error_reporting\" target=\"_blank\"]http://www.php.net/error_reporting[/a]
~ D Kuang

#3 Horst Azeglio

Horst Azeglio
  • Members
  • PipPip
  • Member
  • 24 posts

Posted 30 May 2006 - 07:04 PM

Thanks a lot, it works perfectly :)

#4 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 30 May 2006 - 07:17 PM

And if you want to disable error reporting for certain functions only, use error supression:

@file_get_contents('file.txt');

This way it won't give you errors.
~ D Kuang




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users