Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Getting Rid Of Errors
dark
post Jan 20 2005, 05:38 PM
Post #1


Advanced Member
*******

Group: Members
Posts: 119
Joined: 10-October 04
Member No.: 1,657



Hi

Is it ok to use error-reporting(0) locally in a snippet of code that spits an undefined variable error?
I found that fix and was wondering what does everybody do about error messages that keep poping up.

Thanks

Patrick
Go to the top of the page
 
+Quote Post
no9t9
post Jan 21 2005, 03:08 AM
Post #2


Privileged Member
*********

Group: Members
Posts: 773
Joined: 4-November 04
Member No.: 2,118



my scripts don't have error messages... try to find out what's wrong and fix it. or try to do it a different way. there is always more than one way to do something in programming.
Go to the top of the page
 
+Quote Post
OpaQue
post Jan 21 2005, 09:41 AM
Post #3


Administrator
Group Icon

Group: Admin
Posts: 1,479
Joined: 11-June 04
From: Somewhere in Time & Space.
Member No.: 1



Turnning off the error reporting function can sometimes make it hard to track the errors.. So debugging becomes extremely difficult. You can use an include file on top to set this option for all the files. So while you are debugging you can temporarily disable it.

The other option which you have is using the "@" symbol. If you preceed any function with it, the errors are suppressed but they are limited to that line of code only.
Go to the top of the page
 
+Quote Post
LuciferStar
post Jan 21 2005, 12:49 PM
Post #4


Advanced Member
*******

Group: Members
Posts: 114
Joined: 9-August 04
From: Suzhou Jiangsu China
Member No.: 743



try to make your codes work well,
or try '@' before every function you have to use,like

@count($emptyarray);
@fopen("","w");

if you do so,then no error message will be displayed.
Go to the top of the page
 
+Quote Post
dark
post Jan 23 2005, 02:47 PM
Post #5


Advanced Member
*******

Group: Members
Posts: 119
Joined: 10-October 04
Member No.: 1,657



Hi

This is the original poster. Thanks so much for the kind answers and the @ tip, I am going to try to use it asap.
While browsing the web for answers to my problem, I came upon a snippet of code that showed how a variable that sometimes isn't defined creates an error with the parser. So including this variable code in an IF statement would prevent the error also.
Like someone said above, there are several solutions to fix that.

Thanks again

Patrick
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Trap17 Registration Page Linkage Errors(2)
  2. Is The Database System Gone Again? [resolved](12)
  3. Fopen Errors :((6)
  4. Google China(13)
  5. New Found Php Coding Errors(5)
  6. How To Get Rid Of Cyclic Redunduncy Check(crc) Errors From Cd/dvd's(5)
  7. Giving A Flash Button A Link(3)
  8. Menu Errors In Internet Explorer(4)
  9. Major Dns Errors(10)
  10. Two Errors I Get.(1)
  11. Database Errors!(5)
  12. Qupis Hosting Module Errors. Fixed Now!(0)
  13. Header Redirect Errors(5)
  14. Script Not Working :s(5)
  15. Parse Errors While Installing Smf Board(3)
  1. Errors With Php Setcookie() And Headers! Please Help!(2)
  2. Sites Disapeard, Mysql Errors? Also Server Folders Deleted(18)
  3. Why Are There Errors?(2)
  4. Errors,errors,errors!(5)
  5. Internal Server Errors With Phpmyadmin(0)
  6. Computer Errors(9)
  7. [solved]dsn Help (errors)(3)
  8. My 1st Tabbed Browser(9)
  9. Why Is Php All Of A Sudden Spitting Errors At Me?(7)
  10. Frontpage Server Extentions Errors(0)
  11. Errors Trying To Access Website(2)
  12. Errors Setting Up Hosting(1)
  13. Internet Errors(8)
  14. View The Errors In Your Html!(14)
  15. Understanding Html Validation Errors(4)


 



- Lo-Fi Version Time is now: 11th October 2008 - 08:34 AM