All,
Is there a way by which we can hide the warningmessages from being displayed on the web browser?
My code actually works but throws a warning message at the begining which I want to remove.
Hiding php warning messages
Moderator: General Moderators
-
Put this inside your script:
djot
-
Put this inside your script:
Code: Select all
<?php
error_reporting(E_ERROR|E_PARSE);
//...your code...
?>-
- senthilnayagam
- Forum Newbie
- Posts: 17
- Joined: Wed Jun 08, 2005 5:36 am
- Location: Bangalore
error reporting
Hi sriram,
that stuff is called error reporting learn more on the php manual link given below
http://www.php.net/error_reporting
you can put this in the beginning lines of your code, and voila all errors are gone
but be careful, if you have parse-errors(also some times called compiler errors) you will not get any output, sometimes if you are behind a proxy(especially squid) the error will show up as "Zero Sized Reply"
in the manual more info is given on enabling and disabling error with error handlers which is a advanced and sometimes a very useful feature for professional programmers
regards
Senthilnayagam
that stuff is called error reporting learn more on the php manual link given below
http://www.php.net/error_reporting
you can put this in the beginning lines of your code, and voila all errors are gone
Code: Select all
// Turn off all error reporting
error_reporting(0);in the manual more info is given on enabling and disabling error with error handlers which is a advanced and sometimes a very useful feature for professional programmers
regards
Senthilnayagam
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia