Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

php warnings and notices

Posted on 2012-04-09
6
Medium Priority
?
320 Views
Last Modified: 2012-04-09
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.
0
Comment
Question by:genius_geek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
6 Comments
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 2000 total points
ID: 37822866
try,

//error_reporting(E_ALL);  
ini_set('display_errors', 0);
0
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 2000 total points
ID: 37822867
another way is, if you have php.ini control,

Change your php.ini to not show errors ( display_errors = 0 )
0
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 2000 total points
ID: 37822869
add below line at top of your php page
<?php

// top of your php page

ini_set( "display_errors", 0);
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 2000 total points
ID: 37822871
0
 

Author Closing Comment

by:genius_geek
ID: 37822918
thanks mate. it works.
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 37822923
glad to help, tks
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses how to create an extensible mechanism for linked drop downs.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question