php warnings and notices

How to suppress warnings and notices from displaying while running a php page?

For e.g. mypage.php executes and displays with the following output
o/p line 1: Notice: Undefined index: S_txtpdEndDate1 in C:\Program Files (x86)\FileMaker\FileMaker Server\Web Publishing\web-server-support\test\fmi-test\phpsa\test\tabUI\GetDailyRatev2.php on line 260
o/p line 2: 20

the output should still be shown if the enddate is missing. How do i suppress the warnings from showing up while execution? i just want output line 2 to be shown if enddate is missing.
genius_geekAsked:
Who is Participating?
 
Loganathan NatarajanLAMP DeveloperCommented:
add below line at top of your php page
<?php

// top of your php page

ini_set( "display_errors", 0);
0
 
Loganathan NatarajanLAMP DeveloperCommented:
try,

//error_reporting(E_ALL);  
ini_set('display_errors', 0);
0
 
Loganathan NatarajanLAMP DeveloperCommented:
another way is, if you have php.ini control,

Change your php.ini to not show errors ( display_errors = 0 )
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
Loganathan NatarajanLAMP DeveloperCommented:
0
 
genius_geekAuthor Commented:
thanks mate. it works.
0
 
Loganathan NatarajanLAMP DeveloperCommented:
glad to help, tks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.