When php generates any warning it prints on the page i want to ignore it.So that it should not print on the page.Could you help me in doing this?
Printable View
When php generates any warning it prints on the page i want to ignore it.So that it should not print on the page.Could you help me in doing this?
Use the error suppresion operator:
$a = @(56/0);
you can add the @ in front of any function..:)
- ØØ -
But it will suppress errors.I want to suppress warnings only.
You could turn all warnings off:
error_reporting(E_ALL ^ E_WARNING);
I wouldn't recommend that though. Instead, you could just turn them for the function you want to prevent warning display for.